/*
 * Copyright 2018 Google
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/firestore/v1beta1/firestore.proto

#include "google/firestore/v1beta1/firestore.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
namespace google {
namespace firestore {
namespace v1beta1 {
class GetDocumentRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<GetDocumentRequest>
      _instance;
  ::google::protobuf::internal::ArenaStringPtr transaction_;
  const ::google::protobuf::Timestamp* read_time_;
} _GetDocumentRequest_default_instance_;
class ListDocumentsRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ListDocumentsRequest>
      _instance;
  ::google::protobuf::internal::ArenaStringPtr transaction_;
  const ::google::protobuf::Timestamp* read_time_;
} _ListDocumentsRequest_default_instance_;
class ListDocumentsResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ListDocumentsResponse>
      _instance;
} _ListDocumentsResponse_default_instance_;
class CreateDocumentRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CreateDocumentRequest>
      _instance;
} _CreateDocumentRequest_default_instance_;
class UpdateDocumentRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<UpdateDocumentRequest>
      _instance;
} _UpdateDocumentRequest_default_instance_;
class DeleteDocumentRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<DeleteDocumentRequest>
      _instance;
} _DeleteDocumentRequest_default_instance_;
class BatchGetDocumentsRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<BatchGetDocumentsRequest>
      _instance;
  ::google::protobuf::internal::ArenaStringPtr transaction_;
  const ::google::firestore::v1beta1::TransactionOptions* new_transaction_;
  const ::google::protobuf::Timestamp* read_time_;
} _BatchGetDocumentsRequest_default_instance_;
class BatchGetDocumentsResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<BatchGetDocumentsResponse>
      _instance;
  const ::google::firestore::v1beta1::Document* found_;
  ::google::protobuf::internal::ArenaStringPtr missing_;
} _BatchGetDocumentsResponse_default_instance_;
class BeginTransactionRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<BeginTransactionRequest>
      _instance;
} _BeginTransactionRequest_default_instance_;
class BeginTransactionResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<BeginTransactionResponse>
      _instance;
} _BeginTransactionResponse_default_instance_;
class CommitRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CommitRequest>
      _instance;
} _CommitRequest_default_instance_;
class CommitResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CommitResponse>
      _instance;
} _CommitResponse_default_instance_;
class RollbackRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<RollbackRequest>
      _instance;
} _RollbackRequest_default_instance_;
class RunQueryRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<RunQueryRequest>
      _instance;
  const ::google::firestore::v1beta1::StructuredQuery* structured_query_;
  ::google::protobuf::internal::ArenaStringPtr transaction_;
  const ::google::firestore::v1beta1::TransactionOptions* new_transaction_;
  const ::google::protobuf::Timestamp* read_time_;
} _RunQueryRequest_default_instance_;
class RunQueryResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<RunQueryResponse>
      _instance;
} _RunQueryResponse_default_instance_;
class WriteRequest_LabelsEntry_DoNotUseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<WriteRequest_LabelsEntry_DoNotUse>
      _instance;
} _WriteRequest_LabelsEntry_DoNotUse_default_instance_;
class WriteRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<WriteRequest>
      _instance;
} _WriteRequest_default_instance_;
class WriteResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<WriteResponse>
      _instance;
} _WriteResponse_default_instance_;
class ListenRequest_LabelsEntry_DoNotUseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ListenRequest_LabelsEntry_DoNotUse>
      _instance;
} _ListenRequest_LabelsEntry_DoNotUse_default_instance_;
class ListenRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ListenRequest>
      _instance;
  const ::google::firestore::v1beta1::Target* add_target_;
  ::google::protobuf::int32 remove_target_;
} _ListenRequest_default_instance_;
class ListenResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ListenResponse>
      _instance;
  const ::google::firestore::v1beta1::TargetChange* target_change_;
  const ::google::firestore::v1beta1::DocumentChange* document_change_;
  const ::google::firestore::v1beta1::DocumentDelete* document_delete_;
  const ::google::firestore::v1beta1::DocumentRemove* document_remove_;
  const ::google::firestore::v1beta1::ExistenceFilter* filter_;
} _ListenResponse_default_instance_;
class Target_DocumentsTargetDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Target_DocumentsTarget>
      _instance;
} _Target_DocumentsTarget_default_instance_;
class Target_QueryTargetDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Target_QueryTarget>
      _instance;
  const ::google::firestore::v1beta1::StructuredQuery* structured_query_;
} _Target_QueryTarget_default_instance_;
class TargetDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Target>
      _instance;
  const ::google::firestore::v1beta1::Target_QueryTarget* query_;
  const ::google::firestore::v1beta1::Target_DocumentsTarget* documents_;
  ::google::protobuf::internal::ArenaStringPtr resume_token_;
  const ::google::protobuf::Timestamp* read_time_;
} _Target_default_instance_;
class TargetChangeDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TargetChange>
      _instance;
} _TargetChange_default_instance_;
class ListCollectionIdsRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ListCollectionIdsRequest>
      _instance;
} _ListCollectionIdsRequest_default_instance_;
class ListCollectionIdsResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ListCollectionIdsResponse>
      _instance;
} _ListCollectionIdsResponse_default_instance_;
}  // namespace v1beta1
}  // namespace firestore
}  // namespace google
namespace protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto {
void InitDefaultsGetDocumentRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask();
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_GetDocumentRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::GetDocumentRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::GetDocumentRequest::InitAsDefaultInstance();
}

void InitDefaultsGetDocumentRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsGetDocumentRequestImpl);
}

void InitDefaultsListDocumentsRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask();
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::ListDocumentsRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::ListDocumentsRequest::InitAsDefaultInstance();
}

void InitDefaultsListDocumentsRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListDocumentsRequestImpl);
}

void InitDefaultsListDocumentsResponseImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  {
    void* ptr = &::google::firestore::v1beta1::_ListDocumentsResponse_default_instance_;
    new (ptr) ::google::firestore::v1beta1::ListDocumentsResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::ListDocumentsResponse::InitAsDefaultInstance();
}

void InitDefaultsListDocumentsResponse() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListDocumentsResponseImpl);
}

void InitDefaultsCreateDocumentRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask();
  {
    void* ptr = &::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::CreateDocumentRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::CreateDocumentRequest::InitAsDefaultInstance();
}

void InitDefaultsCreateDocumentRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCreateDocumentRequestImpl);
}

void InitDefaultsUpdateDocumentRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask();
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsPrecondition();
  {
    void* ptr = &::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::UpdateDocumentRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::UpdateDocumentRequest::InitAsDefaultInstance();
}

void InitDefaultsUpdateDocumentRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUpdateDocumentRequestImpl);
}

void InitDefaultsDeleteDocumentRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsPrecondition();
  {
    void* ptr = &::google::firestore::v1beta1::_DeleteDocumentRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::DeleteDocumentRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::DeleteDocumentRequest::InitAsDefaultInstance();
}

void InitDefaultsDeleteDocumentRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDeleteDocumentRequestImpl);
}

void InitDefaultsBatchGetDocumentsRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask();
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions();
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::BatchGetDocumentsRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::BatchGetDocumentsRequest::InitAsDefaultInstance();
}

void InitDefaultsBatchGetDocumentsRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBatchGetDocumentsRequestImpl);
}

void InitDefaultsBatchGetDocumentsResponseImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_;
    new (ptr) ::google::firestore::v1beta1::BatchGetDocumentsResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::BatchGetDocumentsResponse::InitAsDefaultInstance();
}

void InitDefaultsBatchGetDocumentsResponse() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBatchGetDocumentsResponseImpl);
}

void InitDefaultsBeginTransactionRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions();
  {
    void* ptr = &::google::firestore::v1beta1::_BeginTransactionRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::BeginTransactionRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::BeginTransactionRequest::InitAsDefaultInstance();
}

void InitDefaultsBeginTransactionRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBeginTransactionRequestImpl);
}

void InitDefaultsBeginTransactionResponseImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  {
    void* ptr = &::google::firestore::v1beta1::_BeginTransactionResponse_default_instance_;
    new (ptr) ::google::firestore::v1beta1::BeginTransactionResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::BeginTransactionResponse::InitAsDefaultInstance();
}

void InitDefaultsBeginTransactionResponse() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBeginTransactionResponseImpl);
}

void InitDefaultsCommitRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite();
  {
    void* ptr = &::google::firestore::v1beta1::_CommitRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::CommitRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::CommitRequest::InitAsDefaultInstance();
}

void InitDefaultsCommitRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCommitRequestImpl);
}

void InitDefaultsCommitResponseImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteResult();
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_CommitResponse_default_instance_;
    new (ptr) ::google::firestore::v1beta1::CommitResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::CommitResponse::InitAsDefaultInstance();
}

void InitDefaultsCommitResponse() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCommitResponseImpl);
}

void InitDefaultsRollbackRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  {
    void* ptr = &::google::firestore::v1beta1::_RollbackRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::RollbackRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::RollbackRequest::InitAsDefaultInstance();
}

void InitDefaultsRollbackRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRollbackRequestImpl);
}

void InitDefaultsRunQueryRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery();
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions();
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_RunQueryRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::RunQueryRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::RunQueryRequest::InitAsDefaultInstance();
}

void InitDefaultsRunQueryRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRunQueryRequestImpl);
}

void InitDefaultsRunQueryResponseImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_RunQueryResponse_default_instance_;
    new (ptr) ::google::firestore::v1beta1::RunQueryResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::RunQueryResponse::InitAsDefaultInstance();
}

void InitDefaultsRunQueryResponse() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRunQueryResponseImpl);
}

void InitDefaultsWriteRequest_LabelsEntry_DoNotUseImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  {
    void* ptr = &::google::firestore::v1beta1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_;
    new (ptr) ::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse();
  }
  ::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance();
}

void InitDefaultsWriteRequest_LabelsEntry_DoNotUse() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsWriteRequest_LabelsEntry_DoNotUseImpl);
}

void InitDefaultsWriteRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite();
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteRequest_LabelsEntry_DoNotUse();
  {
    void* ptr = &::google::firestore::v1beta1::_WriteRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::WriteRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::WriteRequest::InitAsDefaultInstance();
}

void InitDefaultsWriteRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsWriteRequestImpl);
}

void InitDefaultsWriteResponseImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteResult();
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_WriteResponse_default_instance_;
    new (ptr) ::google::firestore::v1beta1::WriteResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::WriteResponse::InitAsDefaultInstance();
}

void InitDefaultsWriteResponse() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsWriteResponseImpl);
}

void InitDefaultsListenRequest_LabelsEntry_DoNotUseImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  {
    void* ptr = &::google::firestore::v1beta1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_;
    new (ptr) ::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse();
  }
  ::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance();
}

void InitDefaultsListenRequest_LabelsEntry_DoNotUse() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListenRequest_LabelsEntry_DoNotUseImpl);
}

void InitDefaultsListenRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget();
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenRequest_LabelsEntry_DoNotUse();
  {
    void* ptr = &::google::firestore::v1beta1::_ListenRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::ListenRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::ListenRequest::InitAsDefaultInstance();
}

void InitDefaultsListenRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListenRequestImpl);
}

void InitDefaultsListenResponseImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTargetChange();
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentChange();
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentDelete();
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentRemove();
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsExistenceFilter();
  {
    void* ptr = &::google::firestore::v1beta1::_ListenResponse_default_instance_;
    new (ptr) ::google::firestore::v1beta1::ListenResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::ListenResponse::InitAsDefaultInstance();
}

void InitDefaultsListenResponse() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListenResponseImpl);
}

void InitDefaultsTarget_DocumentsTargetImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  {
    void* ptr = &::google::firestore::v1beta1::_Target_DocumentsTarget_default_instance_;
    new (ptr) ::google::firestore::v1beta1::Target_DocumentsTarget();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::Target_DocumentsTarget::InitAsDefaultInstance();
}

void InitDefaultsTarget_DocumentsTarget() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTarget_DocumentsTargetImpl);
}

void InitDefaultsTarget_QueryTargetImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery();
  {
    void* ptr = &::google::firestore::v1beta1::_Target_QueryTarget_default_instance_;
    new (ptr) ::google::firestore::v1beta1::Target_QueryTarget();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::Target_QueryTarget::InitAsDefaultInstance();
}

void InitDefaultsTarget_QueryTarget() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTarget_QueryTargetImpl);
}

void InitDefaultsTargetImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget();
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget();
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_Target_default_instance_;
    new (ptr) ::google::firestore::v1beta1::Target();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::Target::InitAsDefaultInstance();
}

void InitDefaultsTarget() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTargetImpl);
}

void InitDefaultsTargetChangeImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2frpc_2fstatus_2eproto::InitDefaultsStatus();
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_TargetChange_default_instance_;
    new (ptr) ::google::firestore::v1beta1::TargetChange();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::TargetChange::InitAsDefaultInstance();
}

void InitDefaultsTargetChange() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTargetChangeImpl);
}

void InitDefaultsListCollectionIdsRequestImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  {
    void* ptr = &::google::firestore::v1beta1::_ListCollectionIdsRequest_default_instance_;
    new (ptr) ::google::firestore::v1beta1::ListCollectionIdsRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::ListCollectionIdsRequest::InitAsDefaultInstance();
}

void InitDefaultsListCollectionIdsRequest() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListCollectionIdsRequestImpl);
}

void InitDefaultsListCollectionIdsResponseImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  {
    void* ptr = &::google::firestore::v1beta1::_ListCollectionIdsResponse_default_instance_;
    new (ptr) ::google::firestore::v1beta1::ListCollectionIdsResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::ListCollectionIdsResponse::InitAsDefaultInstance();
}

void InitDefaultsListCollectionIdsResponse() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListCollectionIdsResponseImpl);
}

::google::protobuf::Metadata file_level_metadata[27];
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];

const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, name_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, mask_),
  offsetof(::google::firestore::v1beta1::GetDocumentRequestDefaultTypeInternal, transaction_),
  offsetof(::google::firestore::v1beta1::GetDocumentRequestDefaultTypeInternal, read_time_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, consistency_selector_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, parent_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, collection_id_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, page_size_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, page_token_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, order_by_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, mask_),
  offsetof(::google::firestore::v1beta1::ListDocumentsRequestDefaultTypeInternal, transaction_),
  offsetof(::google::firestore::v1beta1::ListDocumentsRequestDefaultTypeInternal, read_time_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, show_missing_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, consistency_selector_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsResponse, documents_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsResponse, next_page_token_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, parent_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, collection_id_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, document_id_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, document_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, mask_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, document_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, update_mask_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, mask_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, current_document_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DeleteDocumentRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DeleteDocumentRequest, name_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DeleteDocumentRequest, current_document_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, database_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, documents_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, mask_),
  offsetof(::google::firestore::v1beta1::BatchGetDocumentsRequestDefaultTypeInternal, transaction_),
  offsetof(::google::firestore::v1beta1::BatchGetDocumentsRequestDefaultTypeInternal, new_transaction_),
  offsetof(::google::firestore::v1beta1::BatchGetDocumentsRequestDefaultTypeInternal, read_time_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, consistency_selector_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::google::firestore::v1beta1::BatchGetDocumentsResponseDefaultTypeInternal, found_),
  offsetof(::google::firestore::v1beta1::BatchGetDocumentsResponseDefaultTypeInternal, missing_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, transaction_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, read_time_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, result_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionRequest, database_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionRequest, options_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionResponse, transaction_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, database_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, writes_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, transaction_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitResponse, write_results_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitResponse, commit_time_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RollbackRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RollbackRequest, database_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RollbackRequest, transaction_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, parent_),
  offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, structured_query_),
  offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, transaction_),
  offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, new_transaction_),
  offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, read_time_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, query_type_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, consistency_selector_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, transaction_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, document_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, read_time_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, skipped_results_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, key_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, database_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, stream_id_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, writes_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, stream_token_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, labels_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, stream_id_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, stream_token_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, write_results_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, commit_time_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, key_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, database_),
  offsetof(::google::firestore::v1beta1::ListenRequestDefaultTypeInternal, add_target_),
  offsetof(::google::firestore::v1beta1::ListenRequestDefaultTypeInternal, remove_target_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, labels_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, target_change_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenResponse, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, target_change_),
  offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, document_change_),
  offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, document_delete_),
  offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, document_remove_),
  offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, filter_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenResponse, response_type_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_DocumentsTarget, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_DocumentsTarget, documents_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, parent_),
  offsetof(::google::firestore::v1beta1::Target_QueryTargetDefaultTypeInternal, structured_query_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, query_type_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, query_),
  offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, documents_),
  offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, resume_token_),
  offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, read_time_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, target_id_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, once_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, target_type_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, resume_type_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, target_change_type_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, target_ids_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, cause_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, resume_token_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, read_time_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, parent_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, page_size_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, page_token_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsResponse, collection_ids_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsResponse, next_page_token_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, sizeof(::google::firestore::v1beta1::GetDocumentRequest)},
  { 10, -1, sizeof(::google::firestore::v1beta1::ListDocumentsRequest)},
  { 25, -1, sizeof(::google::firestore::v1beta1::ListDocumentsResponse)},
  { 32, -1, sizeof(::google::firestore::v1beta1::CreateDocumentRequest)},
  { 42, -1, sizeof(::google::firestore::v1beta1::UpdateDocumentRequest)},
  { 51, -1, sizeof(::google::firestore::v1beta1::DeleteDocumentRequest)},
  { 58, -1, sizeof(::google::firestore::v1beta1::BatchGetDocumentsRequest)},
  { 70, -1, sizeof(::google::firestore::v1beta1::BatchGetDocumentsResponse)},
  { 80, -1, sizeof(::google::firestore::v1beta1::BeginTransactionRequest)},
  { 87, -1, sizeof(::google::firestore::v1beta1::BeginTransactionResponse)},
  { 93, -1, sizeof(::google::firestore::v1beta1::CommitRequest)},
  { 101, -1, sizeof(::google::firestore::v1beta1::CommitResponse)},
  { 108, -1, sizeof(::google::firestore::v1beta1::RollbackRequest)},
  { 115, -1, sizeof(::google::firestore::v1beta1::RunQueryRequest)},
  { 127, -1, sizeof(::google::firestore::v1beta1::RunQueryResponse)},
  { 136, 143, sizeof(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse)},
  { 145, -1, sizeof(::google::firestore::v1beta1::WriteRequest)},
  { 155, -1, sizeof(::google::firestore::v1beta1::WriteResponse)},
  { 164, 171, sizeof(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse)},
  { 173, -1, sizeof(::google::firestore::v1beta1::ListenRequest)},
  { 183, -1, sizeof(::google::firestore::v1beta1::ListenResponse)},
  { 194, -1, sizeof(::google::firestore::v1beta1::Target_DocumentsTarget)},
  { 200, -1, sizeof(::google::firestore::v1beta1::Target_QueryTarget)},
  { 208, -1, sizeof(::google::firestore::v1beta1::Target)},
  { 221, -1, sizeof(::google::firestore::v1beta1::TargetChange)},
  { 231, -1, sizeof(::google::firestore::v1beta1::ListCollectionIdsRequest)},
  { 239, -1, sizeof(::google::firestore::v1beta1::ListCollectionIdsResponse)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_GetDocumentRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListDocumentsResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_DeleteDocumentRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_BeginTransactionRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_BeginTransactionResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_CommitRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_CommitResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_RollbackRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_RunQueryRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_RunQueryResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_WriteRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_WriteResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListenRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListenResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_Target_DocumentsTarget_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_Target_QueryTarget_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_Target_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_TargetChange_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListCollectionIdsRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListCollectionIdsResponse_default_instance_),
};

void protobuf_AssignDescriptors() {
  AddDescriptors();
  ::google::protobuf::MessageFactory* factory = NULL;
  AssignDescriptors(
      "google/firestore/v1beta1/firestore.proto", schemas, file_default_instances, TableStruct::offsets, factory,
      file_level_metadata, file_level_enum_descriptors, NULL);
}

void protobuf_AssignDescriptorsOnce() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
}

void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 27);
}

void AddDescriptorsImpl() {
  InitDefaults();
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
      "\n(google/firestore/v1beta1/firestore.pro"
      "to\022\030google.firestore.v1beta1\032\034google/api"
      "/annotations.proto\032%google/firestore/v1b"
      "eta1/common.proto\032\'google/firestore/v1be"
      "ta1/document.proto\032$google/firestore/v1b"
      "eta1/query.proto\032$google/firestore/v1bet"
      "a1/write.proto\032\033google/protobuf/empty.pr"
      "oto\032\037google/protobuf/timestamp.proto\032\027go"
      "ogle/rpc/status.proto\"\270\001\n\022GetDocumentReq"
      "uest\022\014\n\004name\030\001 \001(\t\0224\n\004mask\030\002 \001(\0132&.googl"
      "e.firestore.v1beta1.DocumentMask\022\025\n\013tran"
      "saction\030\003 \001(\014H\000\022/\n\tread_time\030\005 \001(\0132\032.goo"
      "gle.protobuf.TimestampH\000B\026\n\024consistency_"
      "selector\"\242\002\n\024ListDocumentsRequest\022\016\n\006par"
      "ent\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\021\n\tpage"
      "_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\020\n\010order"
      "_by\030\006 \001(\t\0224\n\004mask\030\007 \001(\0132&.google.firesto"
      "re.v1beta1.DocumentMask\022\025\n\013transaction\030\010"
      " \001(\014H\000\022/\n\tread_time\030\n \001(\0132\032.google.proto"
      "buf.TimestampH\000\022\024\n\014show_missing\030\014 \001(\010B\026\n"
      "\024consistency_selector\"g\n\025ListDocumentsRe"
      "sponse\0225\n\tdocuments\030\001 \003(\0132\".google.fires"
      "tore.v1beta1.Document\022\027\n\017next_page_token"
      "\030\002 \001(\t\"\277\001\n\025CreateDocumentRequest\022\016\n\006pare"
      "nt\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\023\n\013docum"
      "ent_id\030\003 \001(\t\0224\n\010document\030\004 \001(\0132\".google."
      "firestore.v1beta1.Document\0224\n\004mask\030\005 \001(\013"
      "2&.google.firestore.v1beta1.DocumentMask"
      "\"\202\002\n\025UpdateDocumentRequest\0224\n\010document\030\001"
      " \001(\0132\".google.firestore.v1beta1.Document"
      "\022;\n\013update_mask\030\002 \001(\0132&.google.firestore"
      ".v1beta1.DocumentMask\0224\n\004mask\030\003 \001(\0132&.go"
      "ogle.firestore.v1beta1.DocumentMask\022@\n\020c"
      "urrent_document\030\004 \001(\0132&.google.firestore"
      ".v1beta1.Precondition\"g\n\025DeleteDocumentR"
      "equest\022\014\n\004name\030\001 \001(\t\022@\n\020current_document"
      "\030\002 \001(\0132&.google.firestore.v1beta1.Precon"
      "dition\"\236\002\n\030BatchGetDocumentsRequest\022\020\n\010d"
      "atabase\030\001 \001(\t\022\021\n\tdocuments\030\002 \003(\t\0224\n\004mask"
      "\030\003 \001(\0132&.google.firestore.v1beta1.Docume"
      "ntMask\022\025\n\013transaction\030\004 \001(\014H\000\022G\n\017new_tra"
      "nsaction\030\005 \001(\0132,.google.firestore.v1beta"
      "1.TransactionOptionsH\000\022/\n\tread_time\030\007 \001("
      "\0132\032.google.protobuf.TimestampH\000B\026\n\024consi"
      "stency_selector\"\261\001\n\031BatchGetDocumentsRes"
      "ponse\0223\n\005found\030\001 \001(\0132\".google.firestore."
      "v1beta1.DocumentH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n"
      "\013transaction\030\003 \001(\014\022-\n\tread_time\030\004 \001(\0132\032."
      "google.protobuf.TimestampB\010\n\006result\"j\n\027B"
      "eginTransactionRequest\022\020\n\010database\030\001 \001(\t"
      "\022=\n\007options\030\002 \001(\0132,.google.firestore.v1b"
      "eta1.TransactionOptions\"/\n\030BeginTransact"
      "ionResponse\022\023\n\013transaction\030\001 \001(\014\"g\n\rComm"
      "itRequest\022\020\n\010database\030\001 \001(\t\022/\n\006writes\030\002 "
      "\003(\0132\037.google.firestore.v1beta1.Write\022\023\n\013"
      "transaction\030\003 \001(\014\"\177\n\016CommitResponse\022<\n\rw"
      "rite_results\030\001 \003(\0132%.google.firestore.v1"
      "beta1.WriteResult\022/\n\013commit_time\030\002 \001(\0132\032"
      ".google.protobuf.Timestamp\"8\n\017RollbackRe"
      "quest\022\020\n\010database\030\001 \001(\t\022\023\n\013transaction\030\002"
      " \001(\014\"\237\002\n\017RunQueryRequest\022\016\n\006parent\030\001 \001(\t"
      "\022E\n\020structured_query\030\002 \001(\0132).google.fire"
      "store.v1beta1.StructuredQueryH\000\022\025\n\013trans"
      "action\030\005 \001(\014H\001\022G\n\017new_transaction\030\006 \001(\0132"
      ",.google.firestore.v1beta1.TransactionOp"
      "tionsH\001\022/\n\tread_time\030\007 \001(\0132\032.google.prot"
      "obuf.TimestampH\001B\014\n\nquery_typeB\026\n\024consis"
      "tency_selector\"\245\001\n\020RunQueryResponse\022\023\n\013t"
      "ransaction\030\002 \001(\014\0224\n\010document\030\001 \001(\0132\".goo"
      "gle.firestore.v1beta1.Document\022-\n\tread_t"
      "ime\030\003 \001(\0132\032.google.protobuf.Timestamp\022\027\n"
      "\017skipped_results\030\004 \001(\005\"\355\001\n\014WriteRequest\022"
      "\020\n\010database\030\001 \001(\t\022\021\n\tstream_id\030\002 \001(\t\022/\n\006"
      "writes\030\003 \003(\0132\037.google.firestore.v1beta1."
      "Write\022\024\n\014stream_token\030\004 \001(\014\022B\n\006labels\030\005 "
      "\003(\01322.google.firestore.v1beta1.WriteRequ"
      "est.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 "
      "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\247\001\n\rWriteResponse"
      "\022\021\n\tstream_id\030\001 \001(\t\022\024\n\014stream_token\030\002 \001("
      "\014\022<\n\rwrite_results\030\003 \003(\0132%.google.firest"
      "ore.v1beta1.WriteResult\022/\n\013commit_time\030\004"
      " \001(\0132\032.google.protobuf.Timestamp\"\367\001\n\rLis"
      "tenRequest\022\020\n\010database\030\001 \001(\t\0226\n\nadd_targ"
      "et\030\002 \001(\0132 .google.firestore.v1beta1.Targ"
      "etH\000\022\027\n\rremove_target\030\003 \001(\005H\000\022C\n\006labels\030"
      "\004 \003(\01323.google.firestore.v1beta1.ListenR"
      "equest.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key"
      "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rtarget_chan"
      "ge\"\356\002\n\016ListenResponse\022\?\n\rtarget_change\030\002"
      " \001(\0132&.google.firestore.v1beta1.TargetCh"
      "angeH\000\022C\n\017document_change\030\003 \001(\0132(.google"
      ".firestore.v1beta1.DocumentChangeH\000\022C\n\017d"
      "ocument_delete\030\004 \001(\0132(.google.firestore."
      "v1beta1.DocumentDeleteH\000\022C\n\017document_rem"
      "ove\030\006 \001(\0132(.google.firestore.v1beta1.Doc"
      "umentRemoveH\000\022;\n\006filter\030\005 \001(\0132).google.f"
      "irestore.v1beta1.ExistenceFilterH\000B\017\n\rre"
      "sponse_type\"\260\003\n\006Target\022=\n\005query\030\002 \001(\0132,."
      "google.firestore.v1beta1.Target.QueryTar"
      "getH\000\022E\n\tdocuments\030\003 \001(\01320.google.firest"
      "ore.v1beta1.Target.DocumentsTargetH\000\022\026\n\014"
      "resume_token\030\004 \001(\014H\001\022/\n\tread_time\030\013 \001(\0132"
      "\032.google.protobuf.TimestampH\001\022\021\n\ttarget_"
      "id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\032$\n\017DocumentsTarge"
      "t\022\021\n\tdocuments\030\002 \003(\t\032r\n\013QueryTarget\022\016\n\006p"
      "arent\030\001 \001(\t\022E\n\020structured_query\030\002 \001(\0132)."
      "google.firestore.v1beta1.StructuredQuery"
      "H\000B\014\n\nquery_typeB\r\n\013target_typeB\r\n\013resum"
      "e_type\"\257\002\n\014TargetChange\022S\n\022target_change"
      "_type\030\001 \001(\01627.google.firestore.v1beta1.T"
      "argetChange.TargetChangeType\022\022\n\ntarget_i"
      "ds\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022.google.rpc.Sta"
      "tus\022\024\n\014resume_token\030\004 \001(\014\022-\n\tread_time\030\006"
      " \001(\0132\032.google.protobuf.Timestamp\"N\n\020Targ"
      "etChangeType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020\001\022\n\n\006"
      "REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"Q\n\030List"
      "CollectionIdsRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\t"
      "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"L\n\031L"
      "istCollectionIdsResponse\022\026\n\016collection_i"
      "ds\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t2\310\023\n\tFi"
      "restore\022\236\001\n\013GetDocument\022,.google.firesto"
      "re.v1beta1.GetDocumentRequest\032\".google.f"
      "irestore.v1beta1.Document\"=\202\323\344\223\0027\0225/v1be"
      "ta1/{name=projects/*/databases/*/documen"
      "ts/*/**}\022\301\001\n\rListDocuments\022..google.fire"
      "store.v1beta1.ListDocumentsRequest\032/.goo"
      "gle.firestore.v1beta1.ListDocumentsRespo"
      "nse\"O\202\323\344\223\002I\022G/v1beta1/{parent=projects/*"
      "/databases/*/documents/*/**}/{collection"
      "_id}\022\276\001\n\016CreateDocument\022/.google.firesto"
      "re.v1beta1.CreateDocumentRequest\032\".googl"
      "e.firestore.v1beta1.Document\"W\202\323\344\223\002Q\"E/v"
      "1beta1/{parent=projects/*/databases/*/do"
      "cuments/**}/{collection_id}:\010document\022\267\001"
      "\n\016UpdateDocument\022/.google.firestore.v1be"
      "ta1.UpdateDocumentRequest\032\".google.fires"
      "tore.v1beta1.Document\"P\202\323\344\223\002J2>/v1beta1/"
      "{document.name=projects/*/databases/*/do"
      "cuments/*/**}:\010document\022\230\001\n\016DeleteDocume"
      "nt\022/.google.firestore.v1beta1.DeleteDocu"
      "mentRequest\032\026.google.protobuf.Empty\"=\202\323\344"
      "\223\0027*5/v1beta1/{name=projects/*/databases"
      "/*/documents/*/**}\022\310\001\n\021BatchGetDocuments"
      "\0222.google.firestore.v1beta1.BatchGetDocu"
      "mentsRequest\0323.google.firestore.v1beta1."
      "BatchGetDocumentsResponse\"H\202\323\344\223\002B\"=/v1be"
      "ta1/{database=projects/*/databases/*}/do"
      "cuments:batchGet:\001*0\001\022\313\001\n\020BeginTransacti"
      "on\0221.google.firestore.v1beta1.BeginTrans"
      "actionRequest\0322.google.firestore.v1beta1"
      ".BeginTransactionResponse\"P\202\323\344\223\002J\"E/v1be"
      "ta1/{database=projects/*/databases/*}/do"
      "cuments:beginTransaction:\001*\022\243\001\n\006Commit\022\'"
      ".google.firestore.v1beta1.CommitRequest\032"
      "(.google.firestore.v1beta1.CommitRespons"
      "e\"F\202\323\344\223\002@\";/v1beta1/{database=projects/*"
      "/databases/*}/documents:commit:\001*\022\227\001\n\010Ro"
      "llback\022).google.firestore.v1beta1.Rollba"
      "ckRequest\032\026.google.protobuf.Empty\"H\202\323\344\223\002"
      "B\"=/v1beta1/{database=projects/*/databas"
      "es/*}/documents:rollback:\001*\022\364\001\n\010RunQuery"
      "\022).google.firestore.v1beta1.RunQueryRequ"
      "est\032*.google.firestore.v1beta1.RunQueryR"
      "esponse\"\216\001\202\323\344\223\002\207\001\";/v1beta1/{parent=proj"
      "ects/*/databases/*/documents}:runQuery:\001"
      "*ZE\"@/v1beta1/{parent=projects/*/databas"
      "es/*/documents/*/**}:runQuery:\001*0\001\022\243\001\n\005W"
      "rite\022&.google.firestore.v1beta1.WriteReq"
      "uest\032\'.google.firestore.v1beta1.WriteRes"
      "ponse\"E\202\323\344\223\002\?\":/v1beta1/{database=projec"
      "ts/*/databases/*}/documents:write:\001*(\0010\001"
      "\022\247\001\n\006Listen\022\'.google.firestore.v1beta1.L"
      "istenRequest\032(.google.firestore.v1beta1."
      "ListenResponse\"F\202\323\344\223\002@\";/v1beta1/{databa"
      "se=projects/*/databases/*}/documents:lis"
      "ten:\001*(\0010\001\022\237\002\n\021ListCollectionIds\0222.googl"
      "e.firestore.v1beta1.ListCollectionIdsReq"
      "uest\0323.google.firestore.v1beta1.ListColl"
      "ectionIdsResponse\"\240\001\202\323\344\223\002\231\001\"D/v1beta1/{p"
      "arent=projects/*/databases/*/documents}:"
      "listCollectionIds:\001*ZN\"I/v1beta1/{parent"
      "=projects/*/databases/*/documents/*/**}:"
      "listCollectionIds:\001*B\274\001\n\034com.google.fire"
      "store.v1beta1B\016FirestoreProtoP\001ZAgoogle."
      "golang.org/genproto/googleapis/firestore"
      "/v1beta1;firestore\242\002\004GCFS\252\002\036Google.Cloud"
      ".Firestore.V1Beta1\312\002\036Google\\Cloud\\Firest"
      "ore\\V1beta1b\006proto3"
  };
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
      descriptor, 7499);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "google/firestore/v1beta1/firestore.proto", &protobuf_RegisterTypes);
  ::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors();
  ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::AddDescriptors();
  ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::AddDescriptors();
  ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::AddDescriptors();
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::AddDescriptors();
  ::protobuf_google_2fprotobuf_2fempty_2eproto::AddDescriptors();
  ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
  ::protobuf_google_2frpc_2fstatus_2eproto::AddDescriptors();
}

void AddDescriptors() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
  StaticDescriptorInitializer() {
    AddDescriptors();
  }
} static_descriptor_initializer;
}  // namespace protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto
namespace google {
namespace firestore {
namespace v1beta1 {
const ::google::protobuf::EnumDescriptor* TargetChange_TargetChangeType_descriptor() {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_enum_descriptors[0];
}
bool TargetChange_TargetChangeType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const TargetChange_TargetChangeType TargetChange::NO_CHANGE;
const TargetChange_TargetChangeType TargetChange::ADD;
const TargetChange_TargetChangeType TargetChange::REMOVE;
const TargetChange_TargetChangeType TargetChange::CURRENT;
const TargetChange_TargetChangeType TargetChange::RESET;
const TargetChange_TargetChangeType TargetChange::TargetChangeType_MIN;
const TargetChange_TargetChangeType TargetChange::TargetChangeType_MAX;
const int TargetChange::TargetChangeType_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

// ===================================================================

void GetDocumentRequest::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_GetDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
      ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  ::google::firestore::v1beta1::_GetDocumentRequest_default_instance_.transaction_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1beta1::_GetDocumentRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void GetDocumentRequest::clear_mask() {
  if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
    delete mask_;
  }
  mask_ = NULL;
}
void GetDocumentRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (read_time) {
    ::google::protobuf::Arena* submessage_arena =
      reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
    if (message_arena != submessage_arena) {
      read_time = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, read_time, submessage_arena);
    }
    set_has_read_time();
    consistency_selector_.read_time_ = read_time;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.GetDocumentRequest.read_time)
}
void GetDocumentRequest::clear_read_time() {
  if (has_read_time()) {
    delete consistency_selector_.read_time_;
    clear_has_consistency_selector();
  }
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int GetDocumentRequest::kNameFieldNumber;
const int GetDocumentRequest::kMaskFieldNumber;
const int GetDocumentRequest::kTransactionFieldNumber;
const int GetDocumentRequest::kReadTimeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

GetDocumentRequest::GetDocumentRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsGetDocumentRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.GetDocumentRequest)
}
GetDocumentRequest::GetDocumentRequest(const GetDocumentRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.name().size() > 0) {
    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.has_mask()) {
    mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_);
  } else {
    mask_ = NULL;
  }
  clear_has_consistency_selector();
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      set_transaction(from.transaction());
      break;
    }
    case kReadTime: {
      mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.GetDocumentRequest)
}

void GetDocumentRequest::SharedCtor() {
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  mask_ = NULL;
  clear_has_consistency_selector();
  _cached_size_ = 0;
}

GetDocumentRequest::~GetDocumentRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.GetDocumentRequest)
  SharedDtor();
}

void GetDocumentRequest::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete mask_;
  if (has_consistency_selector()) {
    clear_consistency_selector();
  }
}

void GetDocumentRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* GetDocumentRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const GetDocumentRequest& GetDocumentRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsGetDocumentRequest();
  return *internal_default_instance();
}

GetDocumentRequest* GetDocumentRequest::New(::google::protobuf::Arena* arena) const {
  GetDocumentRequest* n = new GetDocumentRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void GetDocumentRequest::clear_consistency_selector() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.GetDocumentRequest)
  switch (consistency_selector_case()) {
    case kTransaction: {
      consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kReadTime: {
      delete consistency_selector_.read_time_;
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
}


void GetDocumentRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.GetDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
    delete mask_;
  }
  mask_ = NULL;
  clear_consistency_selector();
  _internal_metadata_.Clear();
}

bool GetDocumentRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.GetDocumentRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string name = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->name().data(), static_cast<int>(this->name().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.GetDocumentRequest.name"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentMask mask = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_mask()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes transaction = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_transaction()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp read_time = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_read_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.GetDocumentRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.GetDocumentRequest)
  return false;
#undef DO_
}

void GetDocumentRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.GetDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.GetDocumentRequest.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->name(), output);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 2;
  if (this->has_mask()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *this->mask_, output);
  }

  // bytes transaction = 3;
  if (has_transaction()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      3, this->transaction(), output);
  }

  // .google.protobuf.Timestamp read_time = 5;
  if (has_read_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, *consistency_selector_.read_time_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.GetDocumentRequest)
}

::google::protobuf::uint8* GetDocumentRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.GetDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.GetDocumentRequest.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 2;
  if (this->has_mask()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, *this->mask_, deterministic, target);
  }

  // bytes transaction = 3;
  if (has_transaction()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        3, this->transaction(), target);
  }

  // .google.protobuf.Timestamp read_time = 5;
  if (has_read_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, *consistency_selector_.read_time_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.GetDocumentRequest)
  return target;
}

size_t GetDocumentRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.GetDocumentRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string name = 1;
  if (this->name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->name());
  }

  // .google.firestore.v1beta1.DocumentMask mask = 2;
  if (this->has_mask()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->mask_);
  }

  switch (consistency_selector_case()) {
    // bytes transaction = 3;
    case kTransaction: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->transaction());
      break;
    }
    // .google.protobuf.Timestamp read_time = 5;
    case kReadTime: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *consistency_selector_.read_time_);
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void GetDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.GetDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const GetDocumentRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const GetDocumentRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.GetDocumentRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.GetDocumentRequest)
    MergeFrom(*source);
  }
}

void GetDocumentRequest::MergeFrom(const GetDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.GetDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.name().size() > 0) {

    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.has_mask()) {
    mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask());
  }
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      set_transaction(from.transaction());
      break;
    }
    case kReadTime: {
      mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
}

void GetDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.GetDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void GetDocumentRequest::CopyFrom(const GetDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.GetDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDocumentRequest::IsInitialized() const {
  return true;
}

void GetDocumentRequest::Swap(GetDocumentRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void GetDocumentRequest::InternalSwap(GetDocumentRequest* other) {
  using std::swap;
  name_.Swap(&other->name_);
  swap(mask_, other->mask_);
  swap(consistency_selector_, other->consistency_selector_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata GetDocumentRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void ListDocumentsRequest::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
      ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  ::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void ListDocumentsRequest::clear_mask() {
  if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
    delete mask_;
  }
  mask_ = NULL;
}
void ListDocumentsRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (read_time) {
    ::google::protobuf::Arena* submessage_arena =
      reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
    if (message_arena != submessage_arena) {
      read_time = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, read_time, submessage_arena);
    }
    set_has_read_time();
    consistency_selector_.read_time_ = read_time;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListDocumentsRequest.read_time)
}
void ListDocumentsRequest::clear_read_time() {
  if (has_read_time()) {
    delete consistency_selector_.read_time_;
    clear_has_consistency_selector();
  }
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ListDocumentsRequest::kParentFieldNumber;
const int ListDocumentsRequest::kCollectionIdFieldNumber;
const int ListDocumentsRequest::kPageSizeFieldNumber;
const int ListDocumentsRequest::kPageTokenFieldNumber;
const int ListDocumentsRequest::kOrderByFieldNumber;
const int ListDocumentsRequest::kMaskFieldNumber;
const int ListDocumentsRequest::kTransactionFieldNumber;
const int ListDocumentsRequest::kReadTimeFieldNumber;
const int ListDocumentsRequest::kShowMissingFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ListDocumentsRequest::ListDocumentsRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListDocumentsRequest)
}
ListDocumentsRequest::ListDocumentsRequest(const ListDocumentsRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.parent().size() > 0) {
    parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.collection_id().size() > 0) {
    collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  }
  page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.page_token().size() > 0) {
    page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  }
  order_by_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.order_by().size() > 0) {
    order_by_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.order_by_);
  }
  if (from.has_mask()) {
    mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_);
  } else {
    mask_ = NULL;
  }
  ::memcpy(&page_size_, &from.page_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&show_missing_) -
    reinterpret_cast<char*>(&page_size_)) + sizeof(show_missing_));
  clear_has_consistency_selector();
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      set_transaction(from.transaction());
      break;
    }
    case kReadTime: {
      mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListDocumentsRequest)
}

void ListDocumentsRequest::SharedCtor() {
  parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  order_by_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&mask_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&show_missing_) -
      reinterpret_cast<char*>(&mask_)) + sizeof(show_missing_));
  clear_has_consistency_selector();
  _cached_size_ = 0;
}

ListDocumentsRequest::~ListDocumentsRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListDocumentsRequest)
  SharedDtor();
}

void ListDocumentsRequest::SharedDtor() {
  parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  collection_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  order_by_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete mask_;
  if (has_consistency_selector()) {
    clear_consistency_selector();
  }
}

void ListDocumentsRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ListDocumentsRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ListDocumentsRequest& ListDocumentsRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsRequest();
  return *internal_default_instance();
}

ListDocumentsRequest* ListDocumentsRequest::New(::google::protobuf::Arena* arena) const {
  ListDocumentsRequest* n = new ListDocumentsRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ListDocumentsRequest::clear_consistency_selector() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.ListDocumentsRequest)
  switch (consistency_selector_case()) {
    case kTransaction: {
      consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kReadTime: {
      delete consistency_selector_.read_time_;
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
}


void ListDocumentsRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListDocumentsRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  collection_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  order_by_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
    delete mask_;
  }
  mask_ = NULL;
  ::memset(&page_size_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&show_missing_) -
      reinterpret_cast<char*>(&page_size_)) + sizeof(show_missing_));
  clear_consistency_selector();
  _internal_metadata_.Clear();
}

bool ListDocumentsRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListDocumentsRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string parent = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_parent()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->parent().data(), static_cast<int>(this->parent().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListDocumentsRequest.parent"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string collection_id = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_collection_id()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->collection_id().data(), static_cast<int>(this->collection_id().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListDocumentsRequest.collection_id"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // int32 page_size = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &page_size_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string page_token = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_page_token()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->page_token().data(), static_cast<int>(this->page_token().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListDocumentsRequest.page_token"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string order_by = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_order_by()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->order_by().data(), static_cast<int>(this->order_by().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListDocumentsRequest.order_by"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentMask mask = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_mask()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes transaction = 8;
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_transaction()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp read_time = 10;
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_read_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bool show_missing = 12;
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(96u /* 96 & 0xFF */)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &show_missing_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListDocumentsRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListDocumentsRequest)
  return false;
#undef DO_
}

void ListDocumentsRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListDocumentsRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->parent().data(), static_cast<int>(this->parent().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListDocumentsRequest.parent");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->parent(), output);
  }

  // string collection_id = 2;
  if (this->collection_id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->collection_id().data(), static_cast<int>(this->collection_id().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListDocumentsRequest.collection_id");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->collection_id(), output);
  }

  // int32 page_size = 3;
  if (this->page_size() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->page_size(), output);
  }

  // string page_token = 4;
  if (this->page_token().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->page_token().data(), static_cast<int>(this->page_token().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListDocumentsRequest.page_token");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      4, this->page_token(), output);
  }

  // string order_by = 6;
  if (this->order_by().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->order_by().data(), static_cast<int>(this->order_by().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListDocumentsRequest.order_by");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      6, this->order_by(), output);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 7;
  if (this->has_mask()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, *this->mask_, output);
  }

  // bytes transaction = 8;
  if (has_transaction()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      8, this->transaction(), output);
  }

  // .google.protobuf.Timestamp read_time = 10;
  if (has_read_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      10, *consistency_selector_.read_time_, output);
  }

  // bool show_missing = 12;
  if (this->show_missing() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(12, this->show_missing(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListDocumentsRequest)
}

::google::protobuf::uint8* ListDocumentsRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListDocumentsRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->parent().data(), static_cast<int>(this->parent().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListDocumentsRequest.parent");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->parent(), target);
  }

  // string collection_id = 2;
  if (this->collection_id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->collection_id().data(), static_cast<int>(this->collection_id().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListDocumentsRequest.collection_id");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->collection_id(), target);
  }

  // int32 page_size = 3;
  if (this->page_size() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->page_size(), target);
  }

  // string page_token = 4;
  if (this->page_token().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->page_token().data(), static_cast<int>(this->page_token().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListDocumentsRequest.page_token");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        4, this->page_token(), target);
  }

  // string order_by = 6;
  if (this->order_by().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->order_by().data(), static_cast<int>(this->order_by().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListDocumentsRequest.order_by");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        6, this->order_by(), target);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 7;
  if (this->has_mask()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        7, *this->mask_, deterministic, target);
  }

  // bytes transaction = 8;
  if (has_transaction()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        8, this->transaction(), target);
  }

  // .google.protobuf.Timestamp read_time = 10;
  if (has_read_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        10, *consistency_selector_.read_time_, deterministic, target);
  }

  // bool show_missing = 12;
  if (this->show_missing() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(12, this->show_missing(), target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListDocumentsRequest)
  return target;
}

size_t ListDocumentsRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListDocumentsRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string parent = 1;
  if (this->parent().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->parent());
  }

  // string collection_id = 2;
  if (this->collection_id().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->collection_id());
  }

  // string page_token = 4;
  if (this->page_token().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->page_token());
  }

  // string order_by = 6;
  if (this->order_by().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->order_by());
  }

  // .google.firestore.v1beta1.DocumentMask mask = 7;
  if (this->has_mask()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->mask_);
  }

  // int32 page_size = 3;
  if (this->page_size() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->page_size());
  }

  // bool show_missing = 12;
  if (this->show_missing() != 0) {
    total_size += 1 + 1;
  }

  switch (consistency_selector_case()) {
    // bytes transaction = 8;
    case kTransaction: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->transaction());
      break;
    }
    // .google.protobuf.Timestamp read_time = 10;
    case kReadTime: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *consistency_selector_.read_time_);
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ListDocumentsRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListDocumentsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const ListDocumentsRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ListDocumentsRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListDocumentsRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListDocumentsRequest)
    MergeFrom(*source);
  }
}

void ListDocumentsRequest::MergeFrom(const ListDocumentsRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListDocumentsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.parent().size() > 0) {

    parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  if (from.collection_id().size() > 0) {

    collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  }
  if (from.page_token().size() > 0) {

    page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  }
  if (from.order_by().size() > 0) {

    order_by_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.order_by_);
  }
  if (from.has_mask()) {
    mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask());
  }
  if (from.page_size() != 0) {
    set_page_size(from.page_size());
  }
  if (from.show_missing() != 0) {
    set_show_missing(from.show_missing());
  }
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      set_transaction(from.transaction());
      break;
    }
    case kReadTime: {
      mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
}

void ListDocumentsRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListDocumentsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListDocumentsRequest::CopyFrom(const ListDocumentsRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListDocumentsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListDocumentsRequest::IsInitialized() const {
  return true;
}

void ListDocumentsRequest::Swap(ListDocumentsRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ListDocumentsRequest::InternalSwap(ListDocumentsRequest* other) {
  using std::swap;
  parent_.Swap(&other->parent_);
  collection_id_.Swap(&other->collection_id_);
  page_token_.Swap(&other->page_token_);
  order_by_.Swap(&other->order_by_);
  swap(mask_, other->mask_);
  swap(page_size_, other->page_size_);
  swap(show_missing_, other->show_missing_);
  swap(consistency_selector_, other->consistency_selector_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ListDocumentsRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void ListDocumentsResponse::InitAsDefaultInstance() {
}
void ListDocumentsResponse::clear_documents() {
  documents_.Clear();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ListDocumentsResponse::kDocumentsFieldNumber;
const int ListDocumentsResponse::kNextPageTokenFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ListDocumentsResponse::ListDocumentsResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsResponse();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListDocumentsResponse)
}
ListDocumentsResponse::ListDocumentsResponse(const ListDocumentsResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      documents_(from.documents_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.next_page_token().size() > 0) {
    next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListDocumentsResponse)
}

void ListDocumentsResponse::SharedCtor() {
  next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _cached_size_ = 0;
}

ListDocumentsResponse::~ListDocumentsResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListDocumentsResponse)
  SharedDtor();
}

void ListDocumentsResponse::SharedDtor() {
  next_page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void ListDocumentsResponse::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ListDocumentsResponse::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ListDocumentsResponse& ListDocumentsResponse::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsResponse();
  return *internal_default_instance();
}

ListDocumentsResponse* ListDocumentsResponse::New(::google::protobuf::Arena* arena) const {
  ListDocumentsResponse* n = new ListDocumentsResponse;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ListDocumentsResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListDocumentsResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  documents_.Clear();
  next_page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

bool ListDocumentsResponse::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListDocumentsResponse)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .google.firestore.v1beta1.Document documents = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_documents()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string next_page_token = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_next_page_token()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListDocumentsResponse.next_page_token"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListDocumentsResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListDocumentsResponse)
  return false;
#undef DO_
}

void ListDocumentsResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListDocumentsResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .google.firestore.v1beta1.Document documents = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->documents_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->documents(static_cast<int>(i)), output);
  }

  // string next_page_token = 2;
  if (this->next_page_token().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListDocumentsResponse.next_page_token");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->next_page_token(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListDocumentsResponse)
}

::google::protobuf::uint8* ListDocumentsResponse::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListDocumentsResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .google.firestore.v1beta1.Document documents = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->documents_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->documents(static_cast<int>(i)), deterministic, target);
  }

  // string next_page_token = 2;
  if (this->next_page_token().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListDocumentsResponse.next_page_token");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->next_page_token(), target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListDocumentsResponse)
  return target;
}

size_t ListDocumentsResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListDocumentsResponse)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated .google.firestore.v1beta1.Document documents = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->documents_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->documents(static_cast<int>(i)));
    }
  }

  // string next_page_token = 2;
  if (this->next_page_token().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->next_page_token());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ListDocumentsResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListDocumentsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const ListDocumentsResponse* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ListDocumentsResponse>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListDocumentsResponse)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListDocumentsResponse)
    MergeFrom(*source);
  }
}

void ListDocumentsResponse::MergeFrom(const ListDocumentsResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListDocumentsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  documents_.MergeFrom(from.documents_);
  if (from.next_page_token().size() > 0) {

    next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  }
}

void ListDocumentsResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListDocumentsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListDocumentsResponse::CopyFrom(const ListDocumentsResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListDocumentsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListDocumentsResponse::IsInitialized() const {
  return true;
}

void ListDocumentsResponse::Swap(ListDocumentsResponse* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ListDocumentsResponse::InternalSwap(ListDocumentsResponse* other) {
  using std::swap;
  documents_.InternalSwap(&other->documents_);
  next_page_token_.Swap(&other->next_page_token_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ListDocumentsResponse::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void CreateDocumentRequest::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1beta1::Document*>(
      ::google::firestore::v1beta1::Document::internal_default_instance());
  ::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
      ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
}
void CreateDocumentRequest::clear_document() {
  if (GetArenaNoVirtual() == NULL && document_ != NULL) {
    delete document_;
  }
  document_ = NULL;
}
void CreateDocumentRequest::clear_mask() {
  if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
    delete mask_;
  }
  mask_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int CreateDocumentRequest::kParentFieldNumber;
const int CreateDocumentRequest::kCollectionIdFieldNumber;
const int CreateDocumentRequest::kDocumentIdFieldNumber;
const int CreateDocumentRequest::kDocumentFieldNumber;
const int CreateDocumentRequest::kMaskFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CreateDocumentRequest::CreateDocumentRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.CreateDocumentRequest)
}
CreateDocumentRequest::CreateDocumentRequest(const CreateDocumentRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.parent().size() > 0) {
    parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.collection_id().size() > 0) {
    collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  }
  document_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.document_id().size() > 0) {
    document_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_id_);
  }
  if (from.has_document()) {
    document_ = new ::google::firestore::v1beta1::Document(*from.document_);
  } else {
    document_ = NULL;
  }
  if (from.has_mask()) {
    mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_);
  } else {
    mask_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.CreateDocumentRequest)
}

void CreateDocumentRequest::SharedCtor() {
  parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  document_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&document_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&mask_) -
      reinterpret_cast<char*>(&document_)) + sizeof(mask_));
  _cached_size_ = 0;
}

CreateDocumentRequest::~CreateDocumentRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.CreateDocumentRequest)
  SharedDtor();
}

void CreateDocumentRequest::SharedDtor() {
  parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  collection_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  document_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete document_;
  if (this != internal_default_instance()) delete mask_;
}

void CreateDocumentRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CreateDocumentRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const CreateDocumentRequest& CreateDocumentRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequest();
  return *internal_default_instance();
}

CreateDocumentRequest* CreateDocumentRequest::New(::google::protobuf::Arena* arena) const {
  CreateDocumentRequest* n = new CreateDocumentRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void CreateDocumentRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.CreateDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  collection_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  document_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && document_ != NULL) {
    delete document_;
  }
  document_ = NULL;
  if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
    delete mask_;
  }
  mask_ = NULL;
  _internal_metadata_.Clear();
}

bool CreateDocumentRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.CreateDocumentRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string parent = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_parent()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->parent().data(), static_cast<int>(this->parent().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.CreateDocumentRequest.parent"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string collection_id = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_collection_id()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->collection_id().data(), static_cast<int>(this->collection_id().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.CreateDocumentRequest.collection_id"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string document_id = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_document_id()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->document_id().data(), static_cast<int>(this->document_id().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.CreateDocumentRequest.document_id"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.Document document = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_document()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentMask mask = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_mask()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.CreateDocumentRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.CreateDocumentRequest)
  return false;
#undef DO_
}

void CreateDocumentRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.CreateDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->parent().data(), static_cast<int>(this->parent().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.CreateDocumentRequest.parent");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->parent(), output);
  }

  // string collection_id = 2;
  if (this->collection_id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->collection_id().data(), static_cast<int>(this->collection_id().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.CreateDocumentRequest.collection_id");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->collection_id(), output);
  }

  // string document_id = 3;
  if (this->document_id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->document_id().data(), static_cast<int>(this->document_id().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.CreateDocumentRequest.document_id");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->document_id(), output);
  }

  // .google.firestore.v1beta1.Document document = 4;
  if (this->has_document()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, *this->document_, output);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 5;
  if (this->has_mask()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, *this->mask_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.CreateDocumentRequest)
}

::google::protobuf::uint8* CreateDocumentRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.CreateDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->parent().data(), static_cast<int>(this->parent().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.CreateDocumentRequest.parent");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->parent(), target);
  }

  // string collection_id = 2;
  if (this->collection_id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->collection_id().data(), static_cast<int>(this->collection_id().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.CreateDocumentRequest.collection_id");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->collection_id(), target);
  }

  // string document_id = 3;
  if (this->document_id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->document_id().data(), static_cast<int>(this->document_id().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.CreateDocumentRequest.document_id");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->document_id(), target);
  }

  // .google.firestore.v1beta1.Document document = 4;
  if (this->has_document()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, *this->document_, deterministic, target);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 5;
  if (this->has_mask()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, *this->mask_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.CreateDocumentRequest)
  return target;
}

size_t CreateDocumentRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.CreateDocumentRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string parent = 1;
  if (this->parent().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->parent());
  }

  // string collection_id = 2;
  if (this->collection_id().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->collection_id());
  }

  // string document_id = 3;
  if (this->document_id().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->document_id());
  }

  // .google.firestore.v1beta1.Document document = 4;
  if (this->has_document()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->document_);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 5;
  if (this->has_mask()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->mask_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void CreateDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.CreateDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const CreateDocumentRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const CreateDocumentRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.CreateDocumentRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.CreateDocumentRequest)
    MergeFrom(*source);
  }
}

void CreateDocumentRequest::MergeFrom(const CreateDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.CreateDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.parent().size() > 0) {

    parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  if (from.collection_id().size() > 0) {

    collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  }
  if (from.document_id().size() > 0) {

    document_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_id_);
  }
  if (from.has_document()) {
    mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document());
  }
  if (from.has_mask()) {
    mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask());
  }
}

void CreateDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.CreateDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void CreateDocumentRequest::CopyFrom(const CreateDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.CreateDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool CreateDocumentRequest::IsInitialized() const {
  return true;
}

void CreateDocumentRequest::Swap(CreateDocumentRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CreateDocumentRequest::InternalSwap(CreateDocumentRequest* other) {
  using std::swap;
  parent_.Swap(&other->parent_);
  collection_id_.Swap(&other->collection_id_);
  document_id_.Swap(&other->document_id_);
  swap(document_, other->document_);
  swap(mask_, other->mask_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata CreateDocumentRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void UpdateDocumentRequest::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1beta1::Document*>(
      ::google::firestore::v1beta1::Document::internal_default_instance());
  ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
      ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
      ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1beta1::Precondition*>(
      ::google::firestore::v1beta1::Precondition::internal_default_instance());
}
void UpdateDocumentRequest::clear_document() {
  if (GetArenaNoVirtual() == NULL && document_ != NULL) {
    delete document_;
  }
  document_ = NULL;
}
void UpdateDocumentRequest::clear_update_mask() {
  if (GetArenaNoVirtual() == NULL && update_mask_ != NULL) {
    delete update_mask_;
  }
  update_mask_ = NULL;
}
void UpdateDocumentRequest::clear_mask() {
  if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
    delete mask_;
  }
  mask_ = NULL;
}
void UpdateDocumentRequest::clear_current_document() {
  if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
    delete current_document_;
  }
  current_document_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int UpdateDocumentRequest::kDocumentFieldNumber;
const int UpdateDocumentRequest::kUpdateMaskFieldNumber;
const int UpdateDocumentRequest::kMaskFieldNumber;
const int UpdateDocumentRequest::kCurrentDocumentFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

UpdateDocumentRequest::UpdateDocumentRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.UpdateDocumentRequest)
}
UpdateDocumentRequest::UpdateDocumentRequest(const UpdateDocumentRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_document()) {
    document_ = new ::google::firestore::v1beta1::Document(*from.document_);
  } else {
    document_ = NULL;
  }
  if (from.has_update_mask()) {
    update_mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.update_mask_);
  } else {
    update_mask_ = NULL;
  }
  if (from.has_mask()) {
    mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_);
  } else {
    mask_ = NULL;
  }
  if (from.has_current_document()) {
    current_document_ = new ::google::firestore::v1beta1::Precondition(*from.current_document_);
  } else {
    current_document_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.UpdateDocumentRequest)
}

void UpdateDocumentRequest::SharedCtor() {
  ::memset(&document_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&current_document_) -
      reinterpret_cast<char*>(&document_)) + sizeof(current_document_));
  _cached_size_ = 0;
}

UpdateDocumentRequest::~UpdateDocumentRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.UpdateDocumentRequest)
  SharedDtor();
}

void UpdateDocumentRequest::SharedDtor() {
  if (this != internal_default_instance()) delete document_;
  if (this != internal_default_instance()) delete update_mask_;
  if (this != internal_default_instance()) delete mask_;
  if (this != internal_default_instance()) delete current_document_;
}

void UpdateDocumentRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* UpdateDocumentRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const UpdateDocumentRequest& UpdateDocumentRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequest();
  return *internal_default_instance();
}

UpdateDocumentRequest* UpdateDocumentRequest::New(::google::protobuf::Arena* arena) const {
  UpdateDocumentRequest* n = new UpdateDocumentRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void UpdateDocumentRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.UpdateDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaNoVirtual() == NULL && document_ != NULL) {
    delete document_;
  }
  document_ = NULL;
  if (GetArenaNoVirtual() == NULL && update_mask_ != NULL) {
    delete update_mask_;
  }
  update_mask_ = NULL;
  if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
    delete mask_;
  }
  mask_ = NULL;
  if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
    delete current_document_;
  }
  current_document_ = NULL;
  _internal_metadata_.Clear();
}

bool UpdateDocumentRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.UpdateDocumentRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.firestore.v1beta1.Document document = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_document()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentMask update_mask = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_update_mask()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentMask mask = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_mask()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.Precondition current_document = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_current_document()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.UpdateDocumentRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.UpdateDocumentRequest)
  return false;
#undef DO_
}

void UpdateDocumentRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.UpdateDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Document document = 1;
  if (this->has_document()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, *this->document_, output);
  }

  // .google.firestore.v1beta1.DocumentMask update_mask = 2;
  if (this->has_update_mask()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *this->update_mask_, output);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 3;
  if (this->has_mask()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *this->mask_, output);
  }

  // .google.firestore.v1beta1.Precondition current_document = 4;
  if (this->has_current_document()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, *this->current_document_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.UpdateDocumentRequest)
}

::google::protobuf::uint8* UpdateDocumentRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.UpdateDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Document document = 1;
  if (this->has_document()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, *this->document_, deterministic, target);
  }

  // .google.firestore.v1beta1.DocumentMask update_mask = 2;
  if (this->has_update_mask()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, *this->update_mask_, deterministic, target);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 3;
  if (this->has_mask()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, *this->mask_, deterministic, target);
  }

  // .google.firestore.v1beta1.Precondition current_document = 4;
  if (this->has_current_document()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, *this->current_document_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.UpdateDocumentRequest)
  return target;
}

size_t UpdateDocumentRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.UpdateDocumentRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // .google.firestore.v1beta1.Document document = 1;
  if (this->has_document()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->document_);
  }

  // .google.firestore.v1beta1.DocumentMask update_mask = 2;
  if (this->has_update_mask()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->update_mask_);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 3;
  if (this->has_mask()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->mask_);
  }

  // .google.firestore.v1beta1.Precondition current_document = 4;
  if (this->has_current_document()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->current_document_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void UpdateDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.UpdateDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const UpdateDocumentRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const UpdateDocumentRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.UpdateDocumentRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.UpdateDocumentRequest)
    MergeFrom(*source);
  }
}

void UpdateDocumentRequest::MergeFrom(const UpdateDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.UpdateDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.has_document()) {
    mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document());
  }
  if (from.has_update_mask()) {
    mutable_update_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.update_mask());
  }
  if (from.has_mask()) {
    mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask());
  }
  if (from.has_current_document()) {
    mutable_current_document()->::google::firestore::v1beta1::Precondition::MergeFrom(from.current_document());
  }
}

void UpdateDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.UpdateDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void UpdateDocumentRequest::CopyFrom(const UpdateDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.UpdateDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool UpdateDocumentRequest::IsInitialized() const {
  return true;
}

void UpdateDocumentRequest::Swap(UpdateDocumentRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void UpdateDocumentRequest::InternalSwap(UpdateDocumentRequest* other) {
  using std::swap;
  swap(document_, other->document_);
  swap(update_mask_, other->update_mask_);
  swap(mask_, other->mask_);
  swap(current_document_, other->current_document_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata UpdateDocumentRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void DeleteDocumentRequest::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_DeleteDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1beta1::Precondition*>(
      ::google::firestore::v1beta1::Precondition::internal_default_instance());
}
void DeleteDocumentRequest::clear_current_document() {
  if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
    delete current_document_;
  }
  current_document_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DeleteDocumentRequest::kNameFieldNumber;
const int DeleteDocumentRequest::kCurrentDocumentFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DeleteDocumentRequest::DeleteDocumentRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DeleteDocumentRequest)
}
DeleteDocumentRequest::DeleteDocumentRequest(const DeleteDocumentRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.name().size() > 0) {
    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.has_current_document()) {
    current_document_ = new ::google::firestore::v1beta1::Precondition(*from.current_document_);
  } else {
    current_document_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DeleteDocumentRequest)
}

void DeleteDocumentRequest::SharedCtor() {
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  current_document_ = NULL;
  _cached_size_ = 0;
}

DeleteDocumentRequest::~DeleteDocumentRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DeleteDocumentRequest)
  SharedDtor();
}

void DeleteDocumentRequest::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete current_document_;
}

void DeleteDocumentRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DeleteDocumentRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const DeleteDocumentRequest& DeleteDocumentRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequest();
  return *internal_default_instance();
}

DeleteDocumentRequest* DeleteDocumentRequest::New(::google::protobuf::Arena* arena) const {
  DeleteDocumentRequest* n = new DeleteDocumentRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DeleteDocumentRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DeleteDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
    delete current_document_;
  }
  current_document_ = NULL;
  _internal_metadata_.Clear();
}

bool DeleteDocumentRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DeleteDocumentRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string name = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->name().data(), static_cast<int>(this->name().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.DeleteDocumentRequest.name"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.Precondition current_document = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_current_document()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DeleteDocumentRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DeleteDocumentRequest)
  return false;
#undef DO_
}

void DeleteDocumentRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DeleteDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.DeleteDocumentRequest.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->name(), output);
  }

  // .google.firestore.v1beta1.Precondition current_document = 2;
  if (this->has_current_document()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *this->current_document_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DeleteDocumentRequest)
}

::google::protobuf::uint8* DeleteDocumentRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DeleteDocumentRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.DeleteDocumentRequest.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // .google.firestore.v1beta1.Precondition current_document = 2;
  if (this->has_current_document()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, *this->current_document_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DeleteDocumentRequest)
  return target;
}

size_t DeleteDocumentRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DeleteDocumentRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string name = 1;
  if (this->name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->name());
  }

  // .google.firestore.v1beta1.Precondition current_document = 2;
  if (this->has_current_document()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->current_document_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DeleteDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DeleteDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const DeleteDocumentRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DeleteDocumentRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DeleteDocumentRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DeleteDocumentRequest)
    MergeFrom(*source);
  }
}

void DeleteDocumentRequest::MergeFrom(const DeleteDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DeleteDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.name().size() > 0) {

    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.has_current_document()) {
    mutable_current_document()->::google::firestore::v1beta1::Precondition::MergeFrom(from.current_document());
  }
}

void DeleteDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DeleteDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DeleteDocumentRequest::CopyFrom(const DeleteDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DeleteDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DeleteDocumentRequest::IsInitialized() const {
  return true;
}

void DeleteDocumentRequest::Swap(DeleteDocumentRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DeleteDocumentRequest::InternalSwap(DeleteDocumentRequest* other) {
  using std::swap;
  name_.Swap(&other->name_);
  swap(current_document_, other->current_document_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DeleteDocumentRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void BatchGetDocumentsRequest::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
      ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1beta1::TransactionOptions*>(
      ::google::firestore::v1beta1::TransactionOptions::internal_default_instance());
  ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void BatchGetDocumentsRequest::clear_mask() {
  if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
    delete mask_;
  }
  mask_ = NULL;
}
void BatchGetDocumentsRequest::set_allocated_new_transaction(::google::firestore::v1beta1::TransactionOptions* new_transaction) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (new_transaction) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      new_transaction = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, new_transaction, submessage_arena);
    }
    set_has_new_transaction();
    consistency_selector_.new_transaction_ = new_transaction;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction)
}
void BatchGetDocumentsRequest::clear_new_transaction() {
  if (has_new_transaction()) {
    delete consistency_selector_.new_transaction_;
    clear_has_consistency_selector();
  }
}
void BatchGetDocumentsRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (read_time) {
    ::google::protobuf::Arena* submessage_arena =
      reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
    if (message_arena != submessage_arena) {
      read_time = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, read_time, submessage_arena);
    }
    set_has_read_time();
    consistency_selector_.read_time_ = read_time;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsRequest.read_time)
}
void BatchGetDocumentsRequest::clear_read_time() {
  if (has_read_time()) {
    delete consistency_selector_.read_time_;
    clear_has_consistency_selector();
  }
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int BatchGetDocumentsRequest::kDatabaseFieldNumber;
const int BatchGetDocumentsRequest::kDocumentsFieldNumber;
const int BatchGetDocumentsRequest::kMaskFieldNumber;
const int BatchGetDocumentsRequest::kTransactionFieldNumber;
const int BatchGetDocumentsRequest::kNewTransactionFieldNumber;
const int BatchGetDocumentsRequest::kReadTimeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

BatchGetDocumentsRequest::BatchGetDocumentsRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BatchGetDocumentsRequest)
}
BatchGetDocumentsRequest::BatchGetDocumentsRequest(const BatchGetDocumentsRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      documents_(from.documents_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.database().size() > 0) {
    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.has_mask()) {
    mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_);
  } else {
    mask_ = NULL;
  }
  clear_has_consistency_selector();
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      set_transaction(from.transaction());
      break;
    }
    case kNewTransaction: {
      mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction());
      break;
    }
    case kReadTime: {
      mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BatchGetDocumentsRequest)
}

void BatchGetDocumentsRequest::SharedCtor() {
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  mask_ = NULL;
  clear_has_consistency_selector();
  _cached_size_ = 0;
}

BatchGetDocumentsRequest::~BatchGetDocumentsRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BatchGetDocumentsRequest)
  SharedDtor();
}

void BatchGetDocumentsRequest::SharedDtor() {
  database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete mask_;
  if (has_consistency_selector()) {
    clear_consistency_selector();
  }
}

void BatchGetDocumentsRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* BatchGetDocumentsRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const BatchGetDocumentsRequest& BatchGetDocumentsRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequest();
  return *internal_default_instance();
}

BatchGetDocumentsRequest* BatchGetDocumentsRequest::New(::google::protobuf::Arena* arena) const {
  BatchGetDocumentsRequest* n = new BatchGetDocumentsRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void BatchGetDocumentsRequest::clear_consistency_selector() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  switch (consistency_selector_case()) {
    case kTransaction: {
      consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kNewTransaction: {
      delete consistency_selector_.new_transaction_;
      break;
    }
    case kReadTime: {
      delete consistency_selector_.read_time_;
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
}


void BatchGetDocumentsRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  documents_.Clear();
  database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
    delete mask_;
  }
  mask_ = NULL;
  clear_consistency_selector();
  _internal_metadata_.Clear();
}

bool BatchGetDocumentsRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string database = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_database()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->database().data(), static_cast<int>(this->database().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.BatchGetDocumentsRequest.database"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string documents = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_documents()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->documents(this->documents_size() - 1).data(),
            static_cast<int>(this->documents(this->documents_size() - 1).length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.BatchGetDocumentsRequest.documents"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentMask mask = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_mask()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes transaction = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_transaction()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.TransactionOptions new_transaction = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_new_transaction()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp read_time = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_read_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BatchGetDocumentsRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BatchGetDocumentsRequest)
  return false;
#undef DO_
}

void BatchGetDocumentsRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.BatchGetDocumentsRequest.database");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->database(), output);
  }

  // repeated string documents = 2;
  for (int i = 0, n = this->documents_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->documents(i).data(), static_cast<int>(this->documents(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.BatchGetDocumentsRequest.documents");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->documents(i), output);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 3;
  if (this->has_mask()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *this->mask_, output);
  }

  // bytes transaction = 4;
  if (has_transaction()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      4, this->transaction(), output);
  }

  // .google.firestore.v1beta1.TransactionOptions new_transaction = 5;
  if (has_new_transaction()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, *consistency_selector_.new_transaction_, output);
  }

  // .google.protobuf.Timestamp read_time = 7;
  if (has_read_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, *consistency_selector_.read_time_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BatchGetDocumentsRequest)
}

::google::protobuf::uint8* BatchGetDocumentsRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.BatchGetDocumentsRequest.database");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->database(), target);
  }

  // repeated string documents = 2;
  for (int i = 0, n = this->documents_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->documents(i).data(), static_cast<int>(this->documents(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.BatchGetDocumentsRequest.documents");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(2, this->documents(i), target);
  }

  // .google.firestore.v1beta1.DocumentMask mask = 3;
  if (this->has_mask()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, *this->mask_, deterministic, target);
  }

  // bytes transaction = 4;
  if (has_transaction()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        4, this->transaction(), target);
  }

  // .google.firestore.v1beta1.TransactionOptions new_transaction = 5;
  if (has_new_transaction()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, *consistency_selector_.new_transaction_, deterministic, target);
  }

  // .google.protobuf.Timestamp read_time = 7;
  if (has_read_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        7, *consistency_selector_.read_time_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BatchGetDocumentsRequest)
  return target;
}

size_t BatchGetDocumentsRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated string documents = 2;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->documents_size());
  for (int i = 0, n = this->documents_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->documents(i));
  }

  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->database());
  }

  // .google.firestore.v1beta1.DocumentMask mask = 3;
  if (this->has_mask()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->mask_);
  }

  switch (consistency_selector_case()) {
    // bytes transaction = 4;
    case kTransaction: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->transaction());
      break;
    }
    // .google.firestore.v1beta1.TransactionOptions new_transaction = 5;
    case kNewTransaction: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *consistency_selector_.new_transaction_);
      break;
    }
    // .google.protobuf.Timestamp read_time = 7;
    case kReadTime: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *consistency_selector_.read_time_);
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void BatchGetDocumentsRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const BatchGetDocumentsRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const BatchGetDocumentsRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BatchGetDocumentsRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BatchGetDocumentsRequest)
    MergeFrom(*source);
  }
}

void BatchGetDocumentsRequest::MergeFrom(const BatchGetDocumentsRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  documents_.MergeFrom(from.documents_);
  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.has_mask()) {
    mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask());
  }
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      set_transaction(from.transaction());
      break;
    }
    case kNewTransaction: {
      mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction());
      break;
    }
    case kReadTime: {
      mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
}

void BatchGetDocumentsRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BatchGetDocumentsRequest::CopyFrom(const BatchGetDocumentsRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BatchGetDocumentsRequest::IsInitialized() const {
  return true;
}

void BatchGetDocumentsRequest::Swap(BatchGetDocumentsRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void BatchGetDocumentsRequest::InternalSwap(BatchGetDocumentsRequest* other) {
  using std::swap;
  documents_.InternalSwap(&other->documents_);
  database_.Swap(&other->database_);
  swap(mask_, other->mask_);
  swap(consistency_selector_, other->consistency_selector_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata BatchGetDocumentsRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void BatchGetDocumentsResponse::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_.found_ = const_cast< ::google::firestore::v1beta1::Document*>(
      ::google::firestore::v1beta1::Document::internal_default_instance());
  ::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_.missing_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void BatchGetDocumentsResponse::set_allocated_found(::google::firestore::v1beta1::Document* found) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_result();
  if (found) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      found = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, found, submessage_arena);
    }
    set_has_found();
    result_.found_ = found;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsResponse.found)
}
void BatchGetDocumentsResponse::clear_found() {
  if (has_found()) {
    delete result_.found_;
    clear_has_result();
  }
}
void BatchGetDocumentsResponse::clear_read_time() {
  if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
    delete read_time_;
  }
  read_time_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int BatchGetDocumentsResponse::kFoundFieldNumber;
const int BatchGetDocumentsResponse::kMissingFieldNumber;
const int BatchGetDocumentsResponse::kTransactionFieldNumber;
const int BatchGetDocumentsResponse::kReadTimeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

BatchGetDocumentsResponse::BatchGetDocumentsResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponse();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BatchGetDocumentsResponse)
}
BatchGetDocumentsResponse::BatchGetDocumentsResponse(const BatchGetDocumentsResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.transaction().size() > 0) {
    transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  if (from.has_read_time()) {
    read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  } else {
    read_time_ = NULL;
  }
  clear_has_result();
  switch (from.result_case()) {
    case kFound: {
      mutable_found()->::google::firestore::v1beta1::Document::MergeFrom(from.found());
      break;
    }
    case kMissing: {
      set_missing(from.missing());
      break;
    }
    case RESULT_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BatchGetDocumentsResponse)
}

void BatchGetDocumentsResponse::SharedCtor() {
  transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  read_time_ = NULL;
  clear_has_result();
  _cached_size_ = 0;
}

BatchGetDocumentsResponse::~BatchGetDocumentsResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BatchGetDocumentsResponse)
  SharedDtor();
}

void BatchGetDocumentsResponse::SharedDtor() {
  transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete read_time_;
  if (has_result()) {
    clear_result();
  }
}

void BatchGetDocumentsResponse::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* BatchGetDocumentsResponse::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const BatchGetDocumentsResponse& BatchGetDocumentsResponse::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponse();
  return *internal_default_instance();
}

BatchGetDocumentsResponse* BatchGetDocumentsResponse::New(::google::protobuf::Arena* arena) const {
  BatchGetDocumentsResponse* n = new BatchGetDocumentsResponse;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void BatchGetDocumentsResponse::clear_result() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  switch (result_case()) {
    case kFound: {
      delete result_.found_;
      break;
    }
    case kMissing: {
      result_.missing_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case RESULT_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = RESULT_NOT_SET;
}


void BatchGetDocumentsResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
    delete read_time_;
  }
  read_time_ = NULL;
  clear_result();
  _internal_metadata_.Clear();
}

bool BatchGetDocumentsResponse::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.firestore.v1beta1.Document found = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_found()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string missing = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_missing()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->missing().data(), static_cast<int>(this->missing().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.BatchGetDocumentsResponse.missing"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes transaction = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_transaction()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp read_time = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_read_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BatchGetDocumentsResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BatchGetDocumentsResponse)
  return false;
#undef DO_
}

void BatchGetDocumentsResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Document found = 1;
  if (has_found()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, *result_.found_, output);
  }

  // string missing = 2;
  if (has_missing()) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->missing().data(), static_cast<int>(this->missing().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.BatchGetDocumentsResponse.missing");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->missing(), output);
  }

  // bytes transaction = 3;
  if (this->transaction().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      3, this->transaction(), output);
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, *this->read_time_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BatchGetDocumentsResponse)
}

::google::protobuf::uint8* BatchGetDocumentsResponse::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Document found = 1;
  if (has_found()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, *result_.found_, deterministic, target);
  }

  // string missing = 2;
  if (has_missing()) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->missing().data(), static_cast<int>(this->missing().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.BatchGetDocumentsResponse.missing");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->missing(), target);
  }

  // bytes transaction = 3;
  if (this->transaction().size() > 0) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        3, this->transaction(), target);
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, *this->read_time_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BatchGetDocumentsResponse)
  return target;
}

size_t BatchGetDocumentsResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // bytes transaction = 3;
  if (this->transaction().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->transaction());
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->read_time_);
  }

  switch (result_case()) {
    // .google.firestore.v1beta1.Document found = 1;
    case kFound: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *result_.found_);
      break;
    }
    // string missing = 2;
    case kMissing: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->missing());
      break;
    }
    case RESULT_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void BatchGetDocumentsResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const BatchGetDocumentsResponse* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const BatchGetDocumentsResponse>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BatchGetDocumentsResponse)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BatchGetDocumentsResponse)
    MergeFrom(*source);
  }
}

void BatchGetDocumentsResponse::MergeFrom(const BatchGetDocumentsResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.transaction().size() > 0) {

    transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  if (from.has_read_time()) {
    mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  }
  switch (from.result_case()) {
    case kFound: {
      mutable_found()->::google::firestore::v1beta1::Document::MergeFrom(from.found());
      break;
    }
    case kMissing: {
      set_missing(from.missing());
      break;
    }
    case RESULT_NOT_SET: {
      break;
    }
  }
}

void BatchGetDocumentsResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BatchGetDocumentsResponse::CopyFrom(const BatchGetDocumentsResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BatchGetDocumentsResponse::IsInitialized() const {
  return true;
}

void BatchGetDocumentsResponse::Swap(BatchGetDocumentsResponse* other) {
  if (other == this) return;
  InternalSwap(other);
}
void BatchGetDocumentsResponse::InternalSwap(BatchGetDocumentsResponse* other) {
  using std::swap;
  transaction_.Swap(&other->transaction_);
  swap(read_time_, other->read_time_);
  swap(result_, other->result_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata BatchGetDocumentsResponse::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void BeginTransactionRequest::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_BeginTransactionRequest_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::firestore::v1beta1::TransactionOptions*>(
      ::google::firestore::v1beta1::TransactionOptions::internal_default_instance());
}
void BeginTransactionRequest::clear_options() {
  if (GetArenaNoVirtual() == NULL && options_ != NULL) {
    delete options_;
  }
  options_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int BeginTransactionRequest::kDatabaseFieldNumber;
const int BeginTransactionRequest::kOptionsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

BeginTransactionRequest::BeginTransactionRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BeginTransactionRequest)
}
BeginTransactionRequest::BeginTransactionRequest(const BeginTransactionRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.database().size() > 0) {
    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.has_options()) {
    options_ = new ::google::firestore::v1beta1::TransactionOptions(*from.options_);
  } else {
    options_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BeginTransactionRequest)
}

void BeginTransactionRequest::SharedCtor() {
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  options_ = NULL;
  _cached_size_ = 0;
}

BeginTransactionRequest::~BeginTransactionRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BeginTransactionRequest)
  SharedDtor();
}

void BeginTransactionRequest::SharedDtor() {
  database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete options_;
}

void BeginTransactionRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* BeginTransactionRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const BeginTransactionRequest& BeginTransactionRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequest();
  return *internal_default_instance();
}

BeginTransactionRequest* BeginTransactionRequest::New(::google::protobuf::Arena* arena) const {
  BeginTransactionRequest* n = new BeginTransactionRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void BeginTransactionRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BeginTransactionRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && options_ != NULL) {
    delete options_;
  }
  options_ = NULL;
  _internal_metadata_.Clear();
}

bool BeginTransactionRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BeginTransactionRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string database = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_database()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->database().data(), static_cast<int>(this->database().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.BeginTransactionRequest.database"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.TransactionOptions options = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_options()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BeginTransactionRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BeginTransactionRequest)
  return false;
#undef DO_
}

void BeginTransactionRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BeginTransactionRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.BeginTransactionRequest.database");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->database(), output);
  }

  // .google.firestore.v1beta1.TransactionOptions options = 2;
  if (this->has_options()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *this->options_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BeginTransactionRequest)
}

::google::protobuf::uint8* BeginTransactionRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BeginTransactionRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.BeginTransactionRequest.database");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->database(), target);
  }

  // .google.firestore.v1beta1.TransactionOptions options = 2;
  if (this->has_options()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, *this->options_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BeginTransactionRequest)
  return target;
}

size_t BeginTransactionRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BeginTransactionRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->database());
  }

  // .google.firestore.v1beta1.TransactionOptions options = 2;
  if (this->has_options()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->options_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void BeginTransactionRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BeginTransactionRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const BeginTransactionRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const BeginTransactionRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BeginTransactionRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BeginTransactionRequest)
    MergeFrom(*source);
  }
}

void BeginTransactionRequest::MergeFrom(const BeginTransactionRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BeginTransactionRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.has_options()) {
    mutable_options()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.options());
  }
}

void BeginTransactionRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BeginTransactionRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BeginTransactionRequest::CopyFrom(const BeginTransactionRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BeginTransactionRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BeginTransactionRequest::IsInitialized() const {
  return true;
}

void BeginTransactionRequest::Swap(BeginTransactionRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void BeginTransactionRequest::InternalSwap(BeginTransactionRequest* other) {
  using std::swap;
  database_.Swap(&other->database_);
  swap(options_, other->options_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata BeginTransactionRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void BeginTransactionResponse::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int BeginTransactionResponse::kTransactionFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

BeginTransactionResponse::BeginTransactionResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponse();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BeginTransactionResponse)
}
BeginTransactionResponse::BeginTransactionResponse(const BeginTransactionResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.transaction().size() > 0) {
    transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BeginTransactionResponse)
}

void BeginTransactionResponse::SharedCtor() {
  transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _cached_size_ = 0;
}

BeginTransactionResponse::~BeginTransactionResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BeginTransactionResponse)
  SharedDtor();
}

void BeginTransactionResponse::SharedDtor() {
  transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void BeginTransactionResponse::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* BeginTransactionResponse::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const BeginTransactionResponse& BeginTransactionResponse::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponse();
  return *internal_default_instance();
}

BeginTransactionResponse* BeginTransactionResponse::New(::google::protobuf::Arena* arena) const {
  BeginTransactionResponse* n = new BeginTransactionResponse;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void BeginTransactionResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BeginTransactionResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

bool BeginTransactionResponse::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BeginTransactionResponse)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // bytes transaction = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_transaction()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BeginTransactionResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BeginTransactionResponse)
  return false;
#undef DO_
}

void BeginTransactionResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BeginTransactionResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // bytes transaction = 1;
  if (this->transaction().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      1, this->transaction(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BeginTransactionResponse)
}

::google::protobuf::uint8* BeginTransactionResponse::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BeginTransactionResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // bytes transaction = 1;
  if (this->transaction().size() > 0) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        1, this->transaction(), target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BeginTransactionResponse)
  return target;
}

size_t BeginTransactionResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BeginTransactionResponse)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // bytes transaction = 1;
  if (this->transaction().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->transaction());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void BeginTransactionResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BeginTransactionResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const BeginTransactionResponse* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const BeginTransactionResponse>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BeginTransactionResponse)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BeginTransactionResponse)
    MergeFrom(*source);
  }
}

void BeginTransactionResponse::MergeFrom(const BeginTransactionResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BeginTransactionResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.transaction().size() > 0) {

    transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
}

void BeginTransactionResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BeginTransactionResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BeginTransactionResponse::CopyFrom(const BeginTransactionResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BeginTransactionResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BeginTransactionResponse::IsInitialized() const {
  return true;
}

void BeginTransactionResponse::Swap(BeginTransactionResponse* other) {
  if (other == this) return;
  InternalSwap(other);
}
void BeginTransactionResponse::InternalSwap(BeginTransactionResponse* other) {
  using std::swap;
  transaction_.Swap(&other->transaction_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata BeginTransactionResponse::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void CommitRequest::InitAsDefaultInstance() {
}
void CommitRequest::clear_writes() {
  writes_.Clear();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int CommitRequest::kDatabaseFieldNumber;
const int CommitRequest::kWritesFieldNumber;
const int CommitRequest::kTransactionFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CommitRequest::CommitRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.CommitRequest)
}
CommitRequest::CommitRequest(const CommitRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      writes_(from.writes_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.database().size() > 0) {
    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.transaction().size() > 0) {
    transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.CommitRequest)
}

void CommitRequest::SharedCtor() {
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _cached_size_ = 0;
}

CommitRequest::~CommitRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.CommitRequest)
  SharedDtor();
}

void CommitRequest::SharedDtor() {
  database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void CommitRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CommitRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const CommitRequest& CommitRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitRequest();
  return *internal_default_instance();
}

CommitRequest* CommitRequest::New(::google::protobuf::Arena* arena) const {
  CommitRequest* n = new CommitRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void CommitRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.CommitRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  writes_.Clear();
  database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

bool CommitRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.CommitRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string database = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_database()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->database().data(), static_cast<int>(this->database().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.CommitRequest.database"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .google.firestore.v1beta1.Write writes = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_writes()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes transaction = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_transaction()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.CommitRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.CommitRequest)
  return false;
#undef DO_
}

void CommitRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.CommitRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.CommitRequest.database");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->database(), output);
  }

  // repeated .google.firestore.v1beta1.Write writes = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->writes(static_cast<int>(i)), output);
  }

  // bytes transaction = 3;
  if (this->transaction().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      3, this->transaction(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.CommitRequest)
}

::google::protobuf::uint8* CommitRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.CommitRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.CommitRequest.database");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->database(), target);
  }

  // repeated .google.firestore.v1beta1.Write writes = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->writes(static_cast<int>(i)), deterministic, target);
  }

  // bytes transaction = 3;
  if (this->transaction().size() > 0) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        3, this->transaction(), target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.CommitRequest)
  return target;
}

size_t CommitRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.CommitRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated .google.firestore.v1beta1.Write writes = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->writes_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->writes(static_cast<int>(i)));
    }
  }

  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->database());
  }

  // bytes transaction = 3;
  if (this->transaction().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->transaction());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void CommitRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.CommitRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const CommitRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const CommitRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.CommitRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.CommitRequest)
    MergeFrom(*source);
  }
}

void CommitRequest::MergeFrom(const CommitRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.CommitRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  writes_.MergeFrom(from.writes_);
  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.transaction().size() > 0) {

    transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
}

void CommitRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.CommitRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void CommitRequest::CopyFrom(const CommitRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.CommitRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool CommitRequest::IsInitialized() const {
  return true;
}

void CommitRequest::Swap(CommitRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CommitRequest::InternalSwap(CommitRequest* other) {
  using std::swap;
  writes_.InternalSwap(&other->writes_);
  database_.Swap(&other->database_);
  transaction_.Swap(&other->transaction_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata CommitRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void CommitResponse::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_CommitResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void CommitResponse::clear_write_results() {
  write_results_.Clear();
}
void CommitResponse::clear_commit_time() {
  if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
    delete commit_time_;
  }
  commit_time_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int CommitResponse::kWriteResultsFieldNumber;
const int CommitResponse::kCommitTimeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CommitResponse::CommitResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitResponse();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.CommitResponse)
}
CommitResponse::CommitResponse(const CommitResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      write_results_(from.write_results_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_commit_time()) {
    commit_time_ = new ::google::protobuf::Timestamp(*from.commit_time_);
  } else {
    commit_time_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.CommitResponse)
}

void CommitResponse::SharedCtor() {
  commit_time_ = NULL;
  _cached_size_ = 0;
}

CommitResponse::~CommitResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.CommitResponse)
  SharedDtor();
}

void CommitResponse::SharedDtor() {
  if (this != internal_default_instance()) delete commit_time_;
}

void CommitResponse::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CommitResponse::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const CommitResponse& CommitResponse::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitResponse();
  return *internal_default_instance();
}

CommitResponse* CommitResponse::New(::google::protobuf::Arena* arena) const {
  CommitResponse* n = new CommitResponse;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void CommitResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.CommitResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  write_results_.Clear();
  if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
    delete commit_time_;
  }
  commit_time_ = NULL;
  _internal_metadata_.Clear();
}

bool CommitResponse::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.CommitResponse)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .google.firestore.v1beta1.WriteResult write_results = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_write_results()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp commit_time = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_commit_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.CommitResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.CommitResponse)
  return false;
#undef DO_
}

void CommitResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.CommitResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .google.firestore.v1beta1.WriteResult write_results = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->write_results(static_cast<int>(i)), output);
  }

  // .google.protobuf.Timestamp commit_time = 2;
  if (this->has_commit_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *this->commit_time_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.CommitResponse)
}

::google::protobuf::uint8* CommitResponse::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.CommitResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .google.firestore.v1beta1.WriteResult write_results = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->write_results(static_cast<int>(i)), deterministic, target);
  }

  // .google.protobuf.Timestamp commit_time = 2;
  if (this->has_commit_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, *this->commit_time_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.CommitResponse)
  return target;
}

size_t CommitResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.CommitResponse)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated .google.firestore.v1beta1.WriteResult write_results = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->write_results_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->write_results(static_cast<int>(i)));
    }
  }

  // .google.protobuf.Timestamp commit_time = 2;
  if (this->has_commit_time()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->commit_time_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void CommitResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.CommitResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const CommitResponse* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const CommitResponse>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.CommitResponse)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.CommitResponse)
    MergeFrom(*source);
  }
}

void CommitResponse::MergeFrom(const CommitResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.CommitResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  write_results_.MergeFrom(from.write_results_);
  if (from.has_commit_time()) {
    mutable_commit_time()->::google::protobuf::Timestamp::MergeFrom(from.commit_time());
  }
}

void CommitResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.CommitResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void CommitResponse::CopyFrom(const CommitResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.CommitResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool CommitResponse::IsInitialized() const {
  return true;
}

void CommitResponse::Swap(CommitResponse* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CommitResponse::InternalSwap(CommitResponse* other) {
  using std::swap;
  write_results_.InternalSwap(&other->write_results_);
  swap(commit_time_, other->commit_time_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata CommitResponse::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void RollbackRequest::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int RollbackRequest::kDatabaseFieldNumber;
const int RollbackRequest::kTransactionFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

RollbackRequest::RollbackRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRollbackRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.RollbackRequest)
}
RollbackRequest::RollbackRequest(const RollbackRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.database().size() > 0) {
    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.transaction().size() > 0) {
    transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.RollbackRequest)
}

void RollbackRequest::SharedCtor() {
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _cached_size_ = 0;
}

RollbackRequest::~RollbackRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.RollbackRequest)
  SharedDtor();
}

void RollbackRequest::SharedDtor() {
  database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void RollbackRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* RollbackRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const RollbackRequest& RollbackRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRollbackRequest();
  return *internal_default_instance();
}

RollbackRequest* RollbackRequest::New(::google::protobuf::Arena* arena) const {
  RollbackRequest* n = new RollbackRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void RollbackRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.RollbackRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

bool RollbackRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.RollbackRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string database = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_database()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->database().data(), static_cast<int>(this->database().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.RollbackRequest.database"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes transaction = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_transaction()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.RollbackRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.RollbackRequest)
  return false;
#undef DO_
}

void RollbackRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.RollbackRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.RollbackRequest.database");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->database(), output);
  }

  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      2, this->transaction(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.RollbackRequest)
}

::google::protobuf::uint8* RollbackRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.RollbackRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.RollbackRequest.database");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->database(), target);
  }

  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        2, this->transaction(), target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.RollbackRequest)
  return target;
}

size_t RollbackRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.RollbackRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->database());
  }

  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->transaction());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void RollbackRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.RollbackRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const RollbackRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const RollbackRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.RollbackRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.RollbackRequest)
    MergeFrom(*source);
  }
}

void RollbackRequest::MergeFrom(const RollbackRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.RollbackRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.transaction().size() > 0) {

    transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
}

void RollbackRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.RollbackRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RollbackRequest::CopyFrom(const RollbackRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.RollbackRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RollbackRequest::IsInitialized() const {
  return true;
}

void RollbackRequest::Swap(RollbackRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void RollbackRequest::InternalSwap(RollbackRequest* other) {
  using std::swap;
  database_.Swap(&other->database_);
  transaction_.Swap(&other->transaction_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata RollbackRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void RunQueryRequest::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.structured_query_ = const_cast< ::google::firestore::v1beta1::StructuredQuery*>(
      ::google::firestore::v1beta1::StructuredQuery::internal_default_instance());
  ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.transaction_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1beta1::TransactionOptions*>(
      ::google::firestore::v1beta1::TransactionOptions::internal_default_instance());
  ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void RunQueryRequest::set_allocated_structured_query(::google::firestore::v1beta1::StructuredQuery* structured_query) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_query_type();
  if (structured_query) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      structured_query = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, structured_query, submessage_arena);
    }
    set_has_structured_query();
    query_type_.structured_query_ = structured_query;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryRequest.structured_query)
}
void RunQueryRequest::clear_structured_query() {
  if (has_structured_query()) {
    delete query_type_.structured_query_;
    clear_has_query_type();
  }
}
void RunQueryRequest::set_allocated_new_transaction(::google::firestore::v1beta1::TransactionOptions* new_transaction) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (new_transaction) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      new_transaction = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, new_transaction, submessage_arena);
    }
    set_has_new_transaction();
    consistency_selector_.new_transaction_ = new_transaction;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryRequest.new_transaction)
}
void RunQueryRequest::clear_new_transaction() {
  if (has_new_transaction()) {
    delete consistency_selector_.new_transaction_;
    clear_has_consistency_selector();
  }
}
void RunQueryRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (read_time) {
    ::google::protobuf::Arena* submessage_arena =
      reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
    if (message_arena != submessage_arena) {
      read_time = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, read_time, submessage_arena);
    }
    set_has_read_time();
    consistency_selector_.read_time_ = read_time;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryRequest.read_time)
}
void RunQueryRequest::clear_read_time() {
  if (has_read_time()) {
    delete consistency_selector_.read_time_;
    clear_has_consistency_selector();
  }
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int RunQueryRequest::kParentFieldNumber;
const int RunQueryRequest::kStructuredQueryFieldNumber;
const int RunQueryRequest::kTransactionFieldNumber;
const int RunQueryRequest::kNewTransactionFieldNumber;
const int RunQueryRequest::kReadTimeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

RunQueryRequest::RunQueryRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.RunQueryRequest)
}
RunQueryRequest::RunQueryRequest(const RunQueryRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.parent().size() > 0) {
    parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  clear_has_query_type();
  switch (from.query_type_case()) {
    case kStructuredQuery: {
      mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query());
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  clear_has_consistency_selector();
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      set_transaction(from.transaction());
      break;
    }
    case kNewTransaction: {
      mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction());
      break;
    }
    case kReadTime: {
      mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.RunQueryRequest)
}

void RunQueryRequest::SharedCtor() {
  parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_query_type();
  clear_has_consistency_selector();
  _cached_size_ = 0;
}

RunQueryRequest::~RunQueryRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.RunQueryRequest)
  SharedDtor();
}

void RunQueryRequest::SharedDtor() {
  parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (has_query_type()) {
    clear_query_type();
  }
  if (has_consistency_selector()) {
    clear_consistency_selector();
  }
}

void RunQueryRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* RunQueryRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const RunQueryRequest& RunQueryRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryRequest();
  return *internal_default_instance();
}

RunQueryRequest* RunQueryRequest::New(::google::protobuf::Arena* arena) const {
  RunQueryRequest* n = new RunQueryRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void RunQueryRequest::clear_query_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.RunQueryRequest)
  switch (query_type_case()) {
    case kStructuredQuery: {
      delete query_type_.structured_query_;
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = QUERY_TYPE_NOT_SET;
}

void RunQueryRequest::clear_consistency_selector() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.RunQueryRequest)
  switch (consistency_selector_case()) {
    case kTransaction: {
      consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kNewTransaction: {
      delete consistency_selector_.new_transaction_;
      break;
    }
    case kReadTime: {
      delete consistency_selector_.read_time_;
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  _oneof_case_[1] = CONSISTENCY_SELECTOR_NOT_SET;
}


void RunQueryRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.RunQueryRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_query_type();
  clear_consistency_selector();
  _internal_metadata_.Clear();
}

bool RunQueryRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.RunQueryRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string parent = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_parent()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->parent().data(), static_cast<int>(this->parent().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.RunQueryRequest.parent"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_structured_query()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes transaction = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_transaction()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.TransactionOptions new_transaction = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_new_transaction()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp read_time = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_read_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.RunQueryRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.RunQueryRequest)
  return false;
#undef DO_
}

void RunQueryRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.RunQueryRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->parent().data(), static_cast<int>(this->parent().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.RunQueryRequest.parent");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->parent(), output);
  }

  // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  if (has_structured_query()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *query_type_.structured_query_, output);
  }

  // bytes transaction = 5;
  if (has_transaction()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      5, this->transaction(), output);
  }

  // .google.firestore.v1beta1.TransactionOptions new_transaction = 6;
  if (has_new_transaction()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, *consistency_selector_.new_transaction_, output);
  }

  // .google.protobuf.Timestamp read_time = 7;
  if (has_read_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, *consistency_selector_.read_time_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.RunQueryRequest)
}

::google::protobuf::uint8* RunQueryRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.RunQueryRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->parent().data(), static_cast<int>(this->parent().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.RunQueryRequest.parent");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->parent(), target);
  }

  // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  if (has_structured_query()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, *query_type_.structured_query_, deterministic, target);
  }

  // bytes transaction = 5;
  if (has_transaction()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        5, this->transaction(), target);
  }

  // .google.firestore.v1beta1.TransactionOptions new_transaction = 6;
  if (has_new_transaction()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        6, *consistency_selector_.new_transaction_, deterministic, target);
  }

  // .google.protobuf.Timestamp read_time = 7;
  if (has_read_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        7, *consistency_selector_.read_time_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.RunQueryRequest)
  return target;
}

size_t RunQueryRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.RunQueryRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string parent = 1;
  if (this->parent().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->parent());
  }

  switch (query_type_case()) {
    // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
    case kStructuredQuery: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *query_type_.structured_query_);
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  switch (consistency_selector_case()) {
    // bytes transaction = 5;
    case kTransaction: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->transaction());
      break;
    }
    // .google.firestore.v1beta1.TransactionOptions new_transaction = 6;
    case kNewTransaction: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *consistency_selector_.new_transaction_);
      break;
    }
    // .google.protobuf.Timestamp read_time = 7;
    case kReadTime: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *consistency_selector_.read_time_);
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void RunQueryRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.RunQueryRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const RunQueryRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const RunQueryRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.RunQueryRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.RunQueryRequest)
    MergeFrom(*source);
  }
}

void RunQueryRequest::MergeFrom(const RunQueryRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.RunQueryRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.parent().size() > 0) {

    parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  switch (from.query_type_case()) {
    case kStructuredQuery: {
      mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query());
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      set_transaction(from.transaction());
      break;
    }
    case kNewTransaction: {
      mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction());
      break;
    }
    case kReadTime: {
      mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
}

void RunQueryRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.RunQueryRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RunQueryRequest::CopyFrom(const RunQueryRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.RunQueryRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RunQueryRequest::IsInitialized() const {
  return true;
}

void RunQueryRequest::Swap(RunQueryRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void RunQueryRequest::InternalSwap(RunQueryRequest* other) {
  using std::swap;
  parent_.Swap(&other->parent_);
  swap(query_type_, other->query_type_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(consistency_selector_, other->consistency_selector_);
  swap(_oneof_case_[1], other->_oneof_case_[1]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata RunQueryRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void RunQueryResponse::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_RunQueryResponse_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1beta1::Document*>(
      ::google::firestore::v1beta1::Document::internal_default_instance());
  ::google::firestore::v1beta1::_RunQueryResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void RunQueryResponse::clear_document() {
  if (GetArenaNoVirtual() == NULL && document_ != NULL) {
    delete document_;
  }
  document_ = NULL;
}
void RunQueryResponse::clear_read_time() {
  if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
    delete read_time_;
  }
  read_time_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int RunQueryResponse::kTransactionFieldNumber;
const int RunQueryResponse::kDocumentFieldNumber;
const int RunQueryResponse::kReadTimeFieldNumber;
const int RunQueryResponse::kSkippedResultsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

RunQueryResponse::RunQueryResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryResponse();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.RunQueryResponse)
}
RunQueryResponse::RunQueryResponse(const RunQueryResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.transaction().size() > 0) {
    transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  if (from.has_document()) {
    document_ = new ::google::firestore::v1beta1::Document(*from.document_);
  } else {
    document_ = NULL;
  }
  if (from.has_read_time()) {
    read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  } else {
    read_time_ = NULL;
  }
  skipped_results_ = from.skipped_results_;
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.RunQueryResponse)
}

void RunQueryResponse::SharedCtor() {
  transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&document_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&skipped_results_) -
      reinterpret_cast<char*>(&document_)) + sizeof(skipped_results_));
  _cached_size_ = 0;
}

RunQueryResponse::~RunQueryResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.RunQueryResponse)
  SharedDtor();
}

void RunQueryResponse::SharedDtor() {
  transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete document_;
  if (this != internal_default_instance()) delete read_time_;
}

void RunQueryResponse::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* RunQueryResponse::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const RunQueryResponse& RunQueryResponse::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryResponse();
  return *internal_default_instance();
}

RunQueryResponse* RunQueryResponse::New(::google::protobuf::Arena* arena) const {
  RunQueryResponse* n = new RunQueryResponse;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void RunQueryResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.RunQueryResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && document_ != NULL) {
    delete document_;
  }
  document_ = NULL;
  if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
    delete read_time_;
  }
  read_time_ = NULL;
  skipped_results_ = 0;
  _internal_metadata_.Clear();
}

bool RunQueryResponse::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.RunQueryResponse)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.firestore.v1beta1.Document document = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_document()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes transaction = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_transaction()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp read_time = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_read_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // int32 skipped_results = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &skipped_results_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.RunQueryResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.RunQueryResponse)
  return false;
#undef DO_
}

void RunQueryResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.RunQueryResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Document document = 1;
  if (this->has_document()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, *this->document_, output);
  }

  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      2, this->transaction(), output);
  }

  // .google.protobuf.Timestamp read_time = 3;
  if (this->has_read_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *this->read_time_, output);
  }

  // int32 skipped_results = 4;
  if (this->skipped_results() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->skipped_results(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.RunQueryResponse)
}

::google::protobuf::uint8* RunQueryResponse::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.RunQueryResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Document document = 1;
  if (this->has_document()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, *this->document_, deterministic, target);
  }

  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        2, this->transaction(), target);
  }

  // .google.protobuf.Timestamp read_time = 3;
  if (this->has_read_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, *this->read_time_, deterministic, target);
  }

  // int32 skipped_results = 4;
  if (this->skipped_results() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->skipped_results(), target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.RunQueryResponse)
  return target;
}

size_t RunQueryResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.RunQueryResponse)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->transaction());
  }

  // .google.firestore.v1beta1.Document document = 1;
  if (this->has_document()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->document_);
  }

  // .google.protobuf.Timestamp read_time = 3;
  if (this->has_read_time()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->read_time_);
  }

  // int32 skipped_results = 4;
  if (this->skipped_results() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->skipped_results());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void RunQueryResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.RunQueryResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const RunQueryResponse* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const RunQueryResponse>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.RunQueryResponse)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.RunQueryResponse)
    MergeFrom(*source);
  }
}

void RunQueryResponse::MergeFrom(const RunQueryResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.RunQueryResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.transaction().size() > 0) {

    transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  if (from.has_document()) {
    mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document());
  }
  if (from.has_read_time()) {
    mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  }
  if (from.skipped_results() != 0) {
    set_skipped_results(from.skipped_results());
  }
}

void RunQueryResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.RunQueryResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RunQueryResponse::CopyFrom(const RunQueryResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.RunQueryResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RunQueryResponse::IsInitialized() const {
  return true;
}

void RunQueryResponse::Swap(RunQueryResponse* other) {
  if (other == this) return;
  InternalSwap(other);
}
void RunQueryResponse::InternalSwap(RunQueryResponse* other) {
  using std::swap;
  transaction_.Swap(&other->transaction_);
  swap(document_, other->document_);
  swap(read_time_, other->read_time_);
  swap(skipped_results_, other->skipped_results_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata RunQueryResponse::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

WriteRequest_LabelsEntry_DoNotUse::WriteRequest_LabelsEntry_DoNotUse() {}
WriteRequest_LabelsEntry_DoNotUse::WriteRequest_LabelsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
void WriteRequest_LabelsEntry_DoNotUse::MergeFrom(const WriteRequest_LabelsEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::google::protobuf::Metadata WriteRequest_LabelsEntry_DoNotUse::GetMetadata() const {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[15];
}
void WriteRequest_LabelsEntry_DoNotUse::MergeFrom(
    const ::google::protobuf::Message& other) {
  ::google::protobuf::Message::MergeFrom(other);
}


// ===================================================================

void WriteRequest::InitAsDefaultInstance() {
}
void WriteRequest::clear_writes() {
  writes_.Clear();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int WriteRequest::kDatabaseFieldNumber;
const int WriteRequest::kStreamIdFieldNumber;
const int WriteRequest::kWritesFieldNumber;
const int WriteRequest::kStreamTokenFieldNumber;
const int WriteRequest::kLabelsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

WriteRequest::WriteRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.WriteRequest)
}
WriteRequest::WriteRequest(const WriteRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      writes_(from.writes_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  labels_.MergeFrom(from.labels_);
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.database().size() > 0) {
    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.stream_id().size() > 0) {
    stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  }
  stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.stream_token().size() > 0) {
    stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.WriteRequest)
}

void WriteRequest::SharedCtor() {
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _cached_size_ = 0;
}

WriteRequest::~WriteRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.WriteRequest)
  SharedDtor();
}

void WriteRequest::SharedDtor() {
  database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  stream_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  stream_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void WriteRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* WriteRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const WriteRequest& WriteRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteRequest();
  return *internal_default_instance();
}

WriteRequest* WriteRequest::New(::google::protobuf::Arena* arena) const {
  WriteRequest* n = new WriteRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void WriteRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.WriteRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  writes_.Clear();
  labels_.Clear();
  database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  stream_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  stream_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

bool WriteRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.WriteRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string database = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_database()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->database().data(), static_cast<int>(this->database().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.WriteRequest.database"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string stream_id = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_stream_id()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->stream_id().data(), static_cast<int>(this->stream_id().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.WriteRequest.stream_id"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .google.firestore.v1beta1.Write writes = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_writes()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes stream_token = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_stream_token()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // map<string, string> labels = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          WriteRequest_LabelsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
              WriteRequest_LabelsEntry_DoNotUse,
              ::std::string, ::std::string,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              0 >,
            ::google::protobuf::Map< ::std::string, ::std::string > > parser(&labels_);
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
              input, &parser));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.key().data(), static_cast<int>(parser.key().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.WriteRequest.LabelsEntry.key"));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.value().data(), static_cast<int>(parser.value().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.WriteRequest.LabelsEntry.value"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.WriteRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.WriteRequest)
  return false;
#undef DO_
}

void WriteRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.WriteRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.WriteRequest.database");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->database(), output);
  }

  // string stream_id = 2;
  if (this->stream_id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->stream_id().data(), static_cast<int>(this->stream_id().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.WriteRequest.stream_id");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->stream_id(), output);
  }

  // repeated .google.firestore.v1beta1.Write writes = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->writes(static_cast<int>(i)), output);
  }

  // bytes stream_token = 4;
  if (this->stream_token().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      4, this->stream_token(), output);
  }

  // map<string, string> labels = 5;
  if (!this->labels().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1beta1.WriteRequest.LabelsEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1beta1.WriteRequest.LabelsEntry.value");
      }
    };

    if (output->IsSerializationDeterministic() &&
        this->labels().size() > 1) {
      ::google::protobuf::scoped_array<SortItem> items(
          new SortItem[this->labels().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->labels().begin();
          it != this->labels().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(labels_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            5, *entry, output);
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->labels().begin();
          it != this->labels().end(); ++it) {
        entry.reset(labels_.NewEntryWrapper(
            it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            5, *entry, output);
        Utf8Check::Check(&*it);
      }
    }
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.WriteRequest)
}

::google::protobuf::uint8* WriteRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.WriteRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.WriteRequest.database");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->database(), target);
  }

  // string stream_id = 2;
  if (this->stream_id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->stream_id().data(), static_cast<int>(this->stream_id().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.WriteRequest.stream_id");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->stream_id(), target);
  }

  // repeated .google.firestore.v1beta1.Write writes = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->writes(static_cast<int>(i)), deterministic, target);
  }

  // bytes stream_token = 4;
  if (this->stream_token().size() > 0) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        4, this->stream_token(), target);
  }

  // map<string, string> labels = 5;
  if (!this->labels().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1beta1.WriteRequest.LabelsEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1beta1.WriteRequest.LabelsEntry.value");
      }
    };

    if (deterministic &&
        this->labels().size() > 1) {
      ::google::protobuf::scoped_array<SortItem> items(
          new SortItem[this->labels().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->labels().begin();
          it != this->labels().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(labels_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       5, *entry, deterministic, target);
;
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->labels().begin();
          it != this->labels().end(); ++it) {
        entry.reset(labels_.NewEntryWrapper(
            it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       5, *entry, deterministic, target);
;
        Utf8Check::Check(&*it);
      }
    }
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.WriteRequest)
  return target;
}

size_t WriteRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.WriteRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated .google.firestore.v1beta1.Write writes = 3;
  {
    unsigned int count = static_cast<unsigned int>(this->writes_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->writes(static_cast<int>(i)));
    }
  }

  // map<string, string> labels = 5;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->labels_size());
  {
    ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
    for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
        it = this->labels().begin();
        it != this->labels().end(); ++it) {
      entry.reset(labels_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
  }

  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->database());
  }

  // string stream_id = 2;
  if (this->stream_id().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->stream_id());
  }

  // bytes stream_token = 4;
  if (this->stream_token().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->stream_token());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void WriteRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.WriteRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const WriteRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const WriteRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.WriteRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.WriteRequest)
    MergeFrom(*source);
  }
}

void WriteRequest::MergeFrom(const WriteRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.WriteRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  writes_.MergeFrom(from.writes_);
  labels_.MergeFrom(from.labels_);
  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.stream_id().size() > 0) {

    stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  }
  if (from.stream_token().size() > 0) {

    stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  }
}

void WriteRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.WriteRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void WriteRequest::CopyFrom(const WriteRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.WriteRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WriteRequest::IsInitialized() const {
  return true;
}

void WriteRequest::Swap(WriteRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void WriteRequest::InternalSwap(WriteRequest* other) {
  using std::swap;
  writes_.InternalSwap(&other->writes_);
  labels_.Swap(&other->labels_);
  database_.Swap(&other->database_);
  stream_id_.Swap(&other->stream_id_);
  stream_token_.Swap(&other->stream_token_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata WriteRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void WriteResponse::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_WriteResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void WriteResponse::clear_write_results() {
  write_results_.Clear();
}
void WriteResponse::clear_commit_time() {
  if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
    delete commit_time_;
  }
  commit_time_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int WriteResponse::kStreamIdFieldNumber;
const int WriteResponse::kStreamTokenFieldNumber;
const int WriteResponse::kWriteResultsFieldNumber;
const int WriteResponse::kCommitTimeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

WriteResponse::WriteResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteResponse();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.WriteResponse)
}
WriteResponse::WriteResponse(const WriteResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      write_results_(from.write_results_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.stream_id().size() > 0) {
    stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  }
  stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.stream_token().size() > 0) {
    stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  }
  if (from.has_commit_time()) {
    commit_time_ = new ::google::protobuf::Timestamp(*from.commit_time_);
  } else {
    commit_time_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.WriteResponse)
}

void WriteResponse::SharedCtor() {
  stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  commit_time_ = NULL;
  _cached_size_ = 0;
}

WriteResponse::~WriteResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.WriteResponse)
  SharedDtor();
}

void WriteResponse::SharedDtor() {
  stream_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  stream_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete commit_time_;
}

void WriteResponse::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* WriteResponse::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const WriteResponse& WriteResponse::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteResponse();
  return *internal_default_instance();
}

WriteResponse* WriteResponse::New(::google::protobuf::Arena* arena) const {
  WriteResponse* n = new WriteResponse;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void WriteResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.WriteResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  write_results_.Clear();
  stream_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  stream_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
    delete commit_time_;
  }
  commit_time_ = NULL;
  _internal_metadata_.Clear();
}

bool WriteResponse::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.WriteResponse)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string stream_id = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_stream_id()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->stream_id().data(), static_cast<int>(this->stream_id().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.WriteResponse.stream_id"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes stream_token = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_stream_token()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .google.firestore.v1beta1.WriteResult write_results = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_write_results()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp commit_time = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_commit_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.WriteResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.WriteResponse)
  return false;
#undef DO_
}

void WriteResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.WriteResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string stream_id = 1;
  if (this->stream_id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->stream_id().data(), static_cast<int>(this->stream_id().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.WriteResponse.stream_id");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->stream_id(), output);
  }

  // bytes stream_token = 2;
  if (this->stream_token().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      2, this->stream_token(), output);
  }

  // repeated .google.firestore.v1beta1.WriteResult write_results = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->write_results(static_cast<int>(i)), output);
  }

  // .google.protobuf.Timestamp commit_time = 4;
  if (this->has_commit_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, *this->commit_time_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.WriteResponse)
}

::google::protobuf::uint8* WriteResponse::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.WriteResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string stream_id = 1;
  if (this->stream_id().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->stream_id().data(), static_cast<int>(this->stream_id().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.WriteResponse.stream_id");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->stream_id(), target);
  }

  // bytes stream_token = 2;
  if (this->stream_token().size() > 0) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        2, this->stream_token(), target);
  }

  // repeated .google.firestore.v1beta1.WriteResult write_results = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->write_results(static_cast<int>(i)), deterministic, target);
  }

  // .google.protobuf.Timestamp commit_time = 4;
  if (this->has_commit_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, *this->commit_time_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.WriteResponse)
  return target;
}

size_t WriteResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.WriteResponse)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated .google.firestore.v1beta1.WriteResult write_results = 3;
  {
    unsigned int count = static_cast<unsigned int>(this->write_results_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->write_results(static_cast<int>(i)));
    }
  }

  // string stream_id = 1;
  if (this->stream_id().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->stream_id());
  }

  // bytes stream_token = 2;
  if (this->stream_token().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->stream_token());
  }

  // .google.protobuf.Timestamp commit_time = 4;
  if (this->has_commit_time()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->commit_time_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void WriteResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.WriteResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const WriteResponse* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const WriteResponse>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.WriteResponse)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.WriteResponse)
    MergeFrom(*source);
  }
}

void WriteResponse::MergeFrom(const WriteResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.WriteResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  write_results_.MergeFrom(from.write_results_);
  if (from.stream_id().size() > 0) {

    stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  }
  if (from.stream_token().size() > 0) {

    stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  }
  if (from.has_commit_time()) {
    mutable_commit_time()->::google::protobuf::Timestamp::MergeFrom(from.commit_time());
  }
}

void WriteResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.WriteResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void WriteResponse::CopyFrom(const WriteResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.WriteResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WriteResponse::IsInitialized() const {
  return true;
}

void WriteResponse::Swap(WriteResponse* other) {
  if (other == this) return;
  InternalSwap(other);
}
void WriteResponse::InternalSwap(WriteResponse* other) {
  using std::swap;
  write_results_.InternalSwap(&other->write_results_);
  stream_id_.Swap(&other->stream_id_);
  stream_token_.Swap(&other->stream_token_);
  swap(commit_time_, other->commit_time_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata WriteResponse::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

ListenRequest_LabelsEntry_DoNotUse::ListenRequest_LabelsEntry_DoNotUse() {}
ListenRequest_LabelsEntry_DoNotUse::ListenRequest_LabelsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
void ListenRequest_LabelsEntry_DoNotUse::MergeFrom(const ListenRequest_LabelsEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::google::protobuf::Metadata ListenRequest_LabelsEntry_DoNotUse::GetMetadata() const {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[18];
}
void ListenRequest_LabelsEntry_DoNotUse::MergeFrom(
    const ::google::protobuf::Message& other) {
  ::google::protobuf::Message::MergeFrom(other);
}


// ===================================================================

void ListenRequest::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_ListenRequest_default_instance_.add_target_ = const_cast< ::google::firestore::v1beta1::Target*>(
      ::google::firestore::v1beta1::Target::internal_default_instance());
  ::google::firestore::v1beta1::_ListenRequest_default_instance_.remove_target_ = 0;
}
void ListenRequest::set_allocated_add_target(::google::firestore::v1beta1::Target* add_target) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_target_change();
  if (add_target) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      add_target = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, add_target, submessage_arena);
    }
    set_has_add_target();
    target_change_.add_target_ = add_target;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenRequest.add_target)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ListenRequest::kDatabaseFieldNumber;
const int ListenRequest::kAddTargetFieldNumber;
const int ListenRequest::kRemoveTargetFieldNumber;
const int ListenRequest::kLabelsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ListenRequest::ListenRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListenRequest)
}
ListenRequest::ListenRequest(const ListenRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  labels_.MergeFrom(from.labels_);
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.database().size() > 0) {
    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  clear_has_target_change();
  switch (from.target_change_case()) {
    case kAddTarget: {
      mutable_add_target()->::google::firestore::v1beta1::Target::MergeFrom(from.add_target());
      break;
    }
    case kRemoveTarget: {
      set_remove_target(from.remove_target());
      break;
    }
    case TARGET_CHANGE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListenRequest)
}

void ListenRequest::SharedCtor() {
  database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_target_change();
  _cached_size_ = 0;
}

ListenRequest::~ListenRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListenRequest)
  SharedDtor();
}

void ListenRequest::SharedDtor() {
  database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (has_target_change()) {
    clear_target_change();
  }
}

void ListenRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ListenRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ListenRequest& ListenRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenRequest();
  return *internal_default_instance();
}

ListenRequest* ListenRequest::New(::google::protobuf::Arena* arena) const {
  ListenRequest* n = new ListenRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ListenRequest::clear_target_change() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.ListenRequest)
  switch (target_change_case()) {
    case kAddTarget: {
      delete target_change_.add_target_;
      break;
    }
    case kRemoveTarget: {
      // No need to clear
      break;
    }
    case TARGET_CHANGE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = TARGET_CHANGE_NOT_SET;
}


void ListenRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListenRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  labels_.Clear();
  database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_target_change();
  _internal_metadata_.Clear();
}

bool ListenRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListenRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string database = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_database()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->database().data(), static_cast<int>(this->database().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListenRequest.database"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.Target add_target = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_add_target()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // int32 remove_target = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
          clear_target_change();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &target_change_.remove_target_)));
          set_has_remove_target();
        } else {
          goto handle_unusual;
        }
        break;
      }

      // map<string, string> labels = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          ListenRequest_LabelsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
              ListenRequest_LabelsEntry_DoNotUse,
              ::std::string, ::std::string,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              0 >,
            ::google::protobuf::Map< ::std::string, ::std::string > > parser(&labels_);
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
              input, &parser));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.key().data(), static_cast<int>(parser.key().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListenRequest.LabelsEntry.key"));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.value().data(), static_cast<int>(parser.value().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListenRequest.LabelsEntry.value"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListenRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListenRequest)
  return false;
#undef DO_
}

void ListenRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListenRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListenRequest.database");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->database(), output);
  }

  // .google.firestore.v1beta1.Target add_target = 2;
  if (has_add_target()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *target_change_.add_target_, output);
  }

  // int32 remove_target = 3;
  if (has_remove_target()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->remove_target(), output);
  }

  // map<string, string> labels = 4;
  if (!this->labels().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1beta1.ListenRequest.LabelsEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1beta1.ListenRequest.LabelsEntry.value");
      }
    };

    if (output->IsSerializationDeterministic() &&
        this->labels().size() > 1) {
      ::google::protobuf::scoped_array<SortItem> items(
          new SortItem[this->labels().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->labels().begin();
          it != this->labels().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(labels_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            4, *entry, output);
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->labels().begin();
          it != this->labels().end(); ++it) {
        entry.reset(labels_.NewEntryWrapper(
            it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            4, *entry, output);
        Utf8Check::Check(&*it);
      }
    }
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListenRequest)
}

::google::protobuf::uint8* ListenRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListenRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->database().data(), static_cast<int>(this->database().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListenRequest.database");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->database(), target);
  }

  // .google.firestore.v1beta1.Target add_target = 2;
  if (has_add_target()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, *target_change_.add_target_, deterministic, target);
  }

  // int32 remove_target = 3;
  if (has_remove_target()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->remove_target(), target);
  }

  // map<string, string> labels = 4;
  if (!this->labels().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1beta1.ListenRequest.LabelsEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1beta1.ListenRequest.LabelsEntry.value");
      }
    };

    if (deterministic &&
        this->labels().size() > 1) {
      ::google::protobuf::scoped_array<SortItem> items(
          new SortItem[this->labels().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->labels().begin();
          it != this->labels().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(labels_.NewEntryWrapper(
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       4, *entry, deterministic, target);
;
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
      }
    } else {
      ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->labels().begin();
          it != this->labels().end(); ++it) {
        entry.reset(labels_.NewEntryWrapper(
            it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       4, *entry, deterministic, target);
;
        Utf8Check::Check(&*it);
      }
    }
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListenRequest)
  return target;
}

size_t ListenRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListenRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // map<string, string> labels = 4;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->labels_size());
  {
    ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
    for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
        it = this->labels().begin();
        it != this->labels().end(); ++it) {
      entry.reset(labels_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
  }

  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->database());
  }

  switch (target_change_case()) {
    // .google.firestore.v1beta1.Target add_target = 2;
    case kAddTarget: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *target_change_.add_target_);
      break;
    }
    // int32 remove_target = 3;
    case kRemoveTarget: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->remove_target());
      break;
    }
    case TARGET_CHANGE_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ListenRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListenRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const ListenRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ListenRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListenRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListenRequest)
    MergeFrom(*source);
  }
}

void ListenRequest::MergeFrom(const ListenRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListenRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  labels_.MergeFrom(from.labels_);
  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  switch (from.target_change_case()) {
    case kAddTarget: {
      mutable_add_target()->::google::firestore::v1beta1::Target::MergeFrom(from.add_target());
      break;
    }
    case kRemoveTarget: {
      set_remove_target(from.remove_target());
      break;
    }
    case TARGET_CHANGE_NOT_SET: {
      break;
    }
  }
}

void ListenRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListenRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListenRequest::CopyFrom(const ListenRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListenRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListenRequest::IsInitialized() const {
  return true;
}

void ListenRequest::Swap(ListenRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ListenRequest::InternalSwap(ListenRequest* other) {
  using std::swap;
  labels_.Swap(&other->labels_);
  database_.Swap(&other->database_);
  swap(target_change_, other->target_change_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ListenRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void ListenResponse::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_ListenResponse_default_instance_.target_change_ = const_cast< ::google::firestore::v1beta1::TargetChange*>(
      ::google::firestore::v1beta1::TargetChange::internal_default_instance());
  ::google::firestore::v1beta1::_ListenResponse_default_instance_.document_change_ = const_cast< ::google::firestore::v1beta1::DocumentChange*>(
      ::google::firestore::v1beta1::DocumentChange::internal_default_instance());
  ::google::firestore::v1beta1::_ListenResponse_default_instance_.document_delete_ = const_cast< ::google::firestore::v1beta1::DocumentDelete*>(
      ::google::firestore::v1beta1::DocumentDelete::internal_default_instance());
  ::google::firestore::v1beta1::_ListenResponse_default_instance_.document_remove_ = const_cast< ::google::firestore::v1beta1::DocumentRemove*>(
      ::google::firestore::v1beta1::DocumentRemove::internal_default_instance());
  ::google::firestore::v1beta1::_ListenResponse_default_instance_.filter_ = const_cast< ::google::firestore::v1beta1::ExistenceFilter*>(
      ::google::firestore::v1beta1::ExistenceFilter::internal_default_instance());
}
void ListenResponse::set_allocated_target_change(::google::firestore::v1beta1::TargetChange* target_change) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_response_type();
  if (target_change) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      target_change = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, target_change, submessage_arena);
    }
    set_has_target_change();
    response_type_.target_change_ = target_change;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.target_change)
}
void ListenResponse::set_allocated_document_change(::google::firestore::v1beta1::DocumentChange* document_change) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_response_type();
  if (document_change) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      document_change = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, document_change, submessage_arena);
    }
    set_has_document_change();
    response_type_.document_change_ = document_change;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.document_change)
}
void ListenResponse::clear_document_change() {
  if (has_document_change()) {
    delete response_type_.document_change_;
    clear_has_response_type();
  }
}
void ListenResponse::set_allocated_document_delete(::google::firestore::v1beta1::DocumentDelete* document_delete) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_response_type();
  if (document_delete) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      document_delete = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, document_delete, submessage_arena);
    }
    set_has_document_delete();
    response_type_.document_delete_ = document_delete;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.document_delete)
}
void ListenResponse::clear_document_delete() {
  if (has_document_delete()) {
    delete response_type_.document_delete_;
    clear_has_response_type();
  }
}
void ListenResponse::set_allocated_document_remove(::google::firestore::v1beta1::DocumentRemove* document_remove) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_response_type();
  if (document_remove) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      document_remove = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, document_remove, submessage_arena);
    }
    set_has_document_remove();
    response_type_.document_remove_ = document_remove;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.document_remove)
}
void ListenResponse::clear_document_remove() {
  if (has_document_remove()) {
    delete response_type_.document_remove_;
    clear_has_response_type();
  }
}
void ListenResponse::set_allocated_filter(::google::firestore::v1beta1::ExistenceFilter* filter) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_response_type();
  if (filter) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      filter = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, filter, submessage_arena);
    }
    set_has_filter();
    response_type_.filter_ = filter;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.filter)
}
void ListenResponse::clear_filter() {
  if (has_filter()) {
    delete response_type_.filter_;
    clear_has_response_type();
  }
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ListenResponse::kTargetChangeFieldNumber;
const int ListenResponse::kDocumentChangeFieldNumber;
const int ListenResponse::kDocumentDeleteFieldNumber;
const int ListenResponse::kDocumentRemoveFieldNumber;
const int ListenResponse::kFilterFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ListenResponse::ListenResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenResponse();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListenResponse)
}
ListenResponse::ListenResponse(const ListenResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  clear_has_response_type();
  switch (from.response_type_case()) {
    case kTargetChange: {
      mutable_target_change()->::google::firestore::v1beta1::TargetChange::MergeFrom(from.target_change());
      break;
    }
    case kDocumentChange: {
      mutable_document_change()->::google::firestore::v1beta1::DocumentChange::MergeFrom(from.document_change());
      break;
    }
    case kDocumentDelete: {
      mutable_document_delete()->::google::firestore::v1beta1::DocumentDelete::MergeFrom(from.document_delete());
      break;
    }
    case kDocumentRemove: {
      mutable_document_remove()->::google::firestore::v1beta1::DocumentRemove::MergeFrom(from.document_remove());
      break;
    }
    case kFilter: {
      mutable_filter()->::google::firestore::v1beta1::ExistenceFilter::MergeFrom(from.filter());
      break;
    }
    case RESPONSE_TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListenResponse)
}

void ListenResponse::SharedCtor() {
  clear_has_response_type();
  _cached_size_ = 0;
}

ListenResponse::~ListenResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListenResponse)
  SharedDtor();
}

void ListenResponse::SharedDtor() {
  if (has_response_type()) {
    clear_response_type();
  }
}

void ListenResponse::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ListenResponse::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ListenResponse& ListenResponse::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenResponse();
  return *internal_default_instance();
}

ListenResponse* ListenResponse::New(::google::protobuf::Arena* arena) const {
  ListenResponse* n = new ListenResponse;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ListenResponse::clear_response_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.ListenResponse)
  switch (response_type_case()) {
    case kTargetChange: {
      delete response_type_.target_change_;
      break;
    }
    case kDocumentChange: {
      delete response_type_.document_change_;
      break;
    }
    case kDocumentDelete: {
      delete response_type_.document_delete_;
      break;
    }
    case kDocumentRemove: {
      delete response_type_.document_remove_;
      break;
    }
    case kFilter: {
      delete response_type_.filter_;
      break;
    }
    case RESPONSE_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = RESPONSE_TYPE_NOT_SET;
}


void ListenResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListenResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_response_type();
  _internal_metadata_.Clear();
}

bool ListenResponse::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListenResponse)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.firestore.v1beta1.TargetChange target_change = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_target_change()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentChange document_change = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_document_change()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentDelete document_delete = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_document_delete()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.ExistenceFilter filter = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_filter()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentRemove document_remove = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_document_remove()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListenResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListenResponse)
  return false;
#undef DO_
}

void ListenResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListenResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.TargetChange target_change = 2;
  if (has_target_change()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *response_type_.target_change_, output);
  }

  // .google.firestore.v1beta1.DocumentChange document_change = 3;
  if (has_document_change()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *response_type_.document_change_, output);
  }

  // .google.firestore.v1beta1.DocumentDelete document_delete = 4;
  if (has_document_delete()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, *response_type_.document_delete_, output);
  }

  // .google.firestore.v1beta1.ExistenceFilter filter = 5;
  if (has_filter()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, *response_type_.filter_, output);
  }

  // .google.firestore.v1beta1.DocumentRemove document_remove = 6;
  if (has_document_remove()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, *response_type_.document_remove_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListenResponse)
}

::google::protobuf::uint8* ListenResponse::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListenResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.TargetChange target_change = 2;
  if (has_target_change()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, *response_type_.target_change_, deterministic, target);
  }

  // .google.firestore.v1beta1.DocumentChange document_change = 3;
  if (has_document_change()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, *response_type_.document_change_, deterministic, target);
  }

  // .google.firestore.v1beta1.DocumentDelete document_delete = 4;
  if (has_document_delete()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, *response_type_.document_delete_, deterministic, target);
  }

  // .google.firestore.v1beta1.ExistenceFilter filter = 5;
  if (has_filter()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, *response_type_.filter_, deterministic, target);
  }

  // .google.firestore.v1beta1.DocumentRemove document_remove = 6;
  if (has_document_remove()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        6, *response_type_.document_remove_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListenResponse)
  return target;
}

size_t ListenResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListenResponse)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  switch (response_type_case()) {
    // .google.firestore.v1beta1.TargetChange target_change = 2;
    case kTargetChange: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *response_type_.target_change_);
      break;
    }
    // .google.firestore.v1beta1.DocumentChange document_change = 3;
    case kDocumentChange: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *response_type_.document_change_);
      break;
    }
    // .google.firestore.v1beta1.DocumentDelete document_delete = 4;
    case kDocumentDelete: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *response_type_.document_delete_);
      break;
    }
    // .google.firestore.v1beta1.DocumentRemove document_remove = 6;
    case kDocumentRemove: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *response_type_.document_remove_);
      break;
    }
    // .google.firestore.v1beta1.ExistenceFilter filter = 5;
    case kFilter: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *response_type_.filter_);
      break;
    }
    case RESPONSE_TYPE_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ListenResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListenResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const ListenResponse* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ListenResponse>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListenResponse)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListenResponse)
    MergeFrom(*source);
  }
}

void ListenResponse::MergeFrom(const ListenResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListenResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.response_type_case()) {
    case kTargetChange: {
      mutable_target_change()->::google::firestore::v1beta1::TargetChange::MergeFrom(from.target_change());
      break;
    }
    case kDocumentChange: {
      mutable_document_change()->::google::firestore::v1beta1::DocumentChange::MergeFrom(from.document_change());
      break;
    }
    case kDocumentDelete: {
      mutable_document_delete()->::google::firestore::v1beta1::DocumentDelete::MergeFrom(from.document_delete());
      break;
    }
    case kDocumentRemove: {
      mutable_document_remove()->::google::firestore::v1beta1::DocumentRemove::MergeFrom(from.document_remove());
      break;
    }
    case kFilter: {
      mutable_filter()->::google::firestore::v1beta1::ExistenceFilter::MergeFrom(from.filter());
      break;
    }
    case RESPONSE_TYPE_NOT_SET: {
      break;
    }
  }
}

void ListenResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListenResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListenResponse::CopyFrom(const ListenResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListenResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListenResponse::IsInitialized() const {
  return true;
}

void ListenResponse::Swap(ListenResponse* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ListenResponse::InternalSwap(ListenResponse* other) {
  using std::swap;
  swap(response_type_, other->response_type_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ListenResponse::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void Target_DocumentsTarget::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Target_DocumentsTarget::kDocumentsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Target_DocumentsTarget::Target_DocumentsTarget()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Target.DocumentsTarget)
}
Target_DocumentsTarget::Target_DocumentsTarget(const Target_DocumentsTarget& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      documents_(from.documents_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Target.DocumentsTarget)
}

void Target_DocumentsTarget::SharedCtor() {
  _cached_size_ = 0;
}

Target_DocumentsTarget::~Target_DocumentsTarget() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Target.DocumentsTarget)
  SharedDtor();
}

void Target_DocumentsTarget::SharedDtor() {
}

void Target_DocumentsTarget::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Target_DocumentsTarget::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const Target_DocumentsTarget& Target_DocumentsTarget::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget();
  return *internal_default_instance();
}

Target_DocumentsTarget* Target_DocumentsTarget::New(::google::protobuf::Arena* arena) const {
  Target_DocumentsTarget* n = new Target_DocumentsTarget;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Target_DocumentsTarget::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Target.DocumentsTarget)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  documents_.Clear();
  _internal_metadata_.Clear();
}

bool Target_DocumentsTarget::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Target.DocumentsTarget)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated string documents = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_documents()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->documents(this->documents_size() - 1).data(),
            static_cast<int>(this->documents(this->documents_size() - 1).length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.Target.DocumentsTarget.documents"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Target.DocumentsTarget)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Target.DocumentsTarget)
  return false;
#undef DO_
}

void Target_DocumentsTarget::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Target.DocumentsTarget)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string documents = 2;
  for (int i = 0, n = this->documents_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->documents(i).data(), static_cast<int>(this->documents(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.Target.DocumentsTarget.documents");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->documents(i), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Target.DocumentsTarget)
}

::google::protobuf::uint8* Target_DocumentsTarget::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Target.DocumentsTarget)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string documents = 2;
  for (int i = 0, n = this->documents_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->documents(i).data(), static_cast<int>(this->documents(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.Target.DocumentsTarget.documents");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(2, this->documents(i), target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Target.DocumentsTarget)
  return target;
}

size_t Target_DocumentsTarget::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Target.DocumentsTarget)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated string documents = 2;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->documents_size());
  for (int i = 0, n = this->documents_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->documents(i));
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Target_DocumentsTarget::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Target.DocumentsTarget)
  GOOGLE_DCHECK_NE(&from, this);
  const Target_DocumentsTarget* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Target_DocumentsTarget>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Target.DocumentsTarget)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Target.DocumentsTarget)
    MergeFrom(*source);
  }
}

void Target_DocumentsTarget::MergeFrom(const Target_DocumentsTarget& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Target.DocumentsTarget)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  documents_.MergeFrom(from.documents_);
}

void Target_DocumentsTarget::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Target.DocumentsTarget)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Target_DocumentsTarget::CopyFrom(const Target_DocumentsTarget& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Target.DocumentsTarget)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Target_DocumentsTarget::IsInitialized() const {
  return true;
}

void Target_DocumentsTarget::Swap(Target_DocumentsTarget* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Target_DocumentsTarget::InternalSwap(Target_DocumentsTarget* other) {
  using std::swap;
  documents_.InternalSwap(&other->documents_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Target_DocumentsTarget::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void Target_QueryTarget::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_Target_QueryTarget_default_instance_.structured_query_ = const_cast< ::google::firestore::v1beta1::StructuredQuery*>(
      ::google::firestore::v1beta1::StructuredQuery::internal_default_instance());
}
void Target_QueryTarget::set_allocated_structured_query(::google::firestore::v1beta1::StructuredQuery* structured_query) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_query_type();
  if (structured_query) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      structured_query = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, structured_query, submessage_arena);
    }
    set_has_structured_query();
    query_type_.structured_query_ = structured_query;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.QueryTarget.structured_query)
}
void Target_QueryTarget::clear_structured_query() {
  if (has_structured_query()) {
    delete query_type_.structured_query_;
    clear_has_query_type();
  }
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Target_QueryTarget::kParentFieldNumber;
const int Target_QueryTarget::kStructuredQueryFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Target_QueryTarget::Target_QueryTarget()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Target.QueryTarget)
}
Target_QueryTarget::Target_QueryTarget(const Target_QueryTarget& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.parent().size() > 0) {
    parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  clear_has_query_type();
  switch (from.query_type_case()) {
    case kStructuredQuery: {
      mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query());
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Target.QueryTarget)
}

void Target_QueryTarget::SharedCtor() {
  parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_query_type();
  _cached_size_ = 0;
}

Target_QueryTarget::~Target_QueryTarget() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Target.QueryTarget)
  SharedDtor();
}

void Target_QueryTarget::SharedDtor() {
  parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (has_query_type()) {
    clear_query_type();
  }
}

void Target_QueryTarget::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Target_QueryTarget::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const Target_QueryTarget& Target_QueryTarget::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget();
  return *internal_default_instance();
}

Target_QueryTarget* Target_QueryTarget::New(::google::protobuf::Arena* arena) const {
  Target_QueryTarget* n = new Target_QueryTarget;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Target_QueryTarget::clear_query_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Target.QueryTarget)
  switch (query_type_case()) {
    case kStructuredQuery: {
      delete query_type_.structured_query_;
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = QUERY_TYPE_NOT_SET;
}


void Target_QueryTarget::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Target.QueryTarget)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_query_type();
  _internal_metadata_.Clear();
}

bool Target_QueryTarget::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Target.QueryTarget)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string parent = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_parent()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->parent().data(), static_cast<int>(this->parent().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.Target.QueryTarget.parent"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_structured_query()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Target.QueryTarget)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Target.QueryTarget)
  return false;
#undef DO_
}

void Target_QueryTarget::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Target.QueryTarget)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->parent().data(), static_cast<int>(this->parent().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.Target.QueryTarget.parent");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->parent(), output);
  }

  // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  if (has_structured_query()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *query_type_.structured_query_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Target.QueryTarget)
}

::google::protobuf::uint8* Target_QueryTarget::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Target.QueryTarget)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->parent().data(), static_cast<int>(this->parent().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.Target.QueryTarget.parent");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->parent(), target);
  }

  // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  if (has_structured_query()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, *query_type_.structured_query_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Target.QueryTarget)
  return target;
}

size_t Target_QueryTarget::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Target.QueryTarget)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string parent = 1;
  if (this->parent().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->parent());
  }

  switch (query_type_case()) {
    // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
    case kStructuredQuery: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *query_type_.structured_query_);
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Target_QueryTarget::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Target.QueryTarget)
  GOOGLE_DCHECK_NE(&from, this);
  const Target_QueryTarget* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Target_QueryTarget>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Target.QueryTarget)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Target.QueryTarget)
    MergeFrom(*source);
  }
}

void Target_QueryTarget::MergeFrom(const Target_QueryTarget& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Target.QueryTarget)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.parent().size() > 0) {

    parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  switch (from.query_type_case()) {
    case kStructuredQuery: {
      mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query());
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
}

void Target_QueryTarget::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Target.QueryTarget)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Target_QueryTarget::CopyFrom(const Target_QueryTarget& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Target.QueryTarget)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Target_QueryTarget::IsInitialized() const {
  return true;
}

void Target_QueryTarget::Swap(Target_QueryTarget* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Target_QueryTarget::InternalSwap(Target_QueryTarget* other) {
  using std::swap;
  parent_.Swap(&other->parent_);
  swap(query_type_, other->query_type_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Target_QueryTarget::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void Target::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1beta1::Target_QueryTarget*>(
      ::google::firestore::v1beta1::Target_QueryTarget::internal_default_instance());
  ::google::firestore::v1beta1::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1beta1::Target_DocumentsTarget*>(
      ::google::firestore::v1beta1::Target_DocumentsTarget::internal_default_instance());
  ::google::firestore::v1beta1::_Target_default_instance_.resume_token_.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1beta1::_Target_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void Target::set_allocated_query(::google::firestore::v1beta1::Target_QueryTarget* query) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_target_type();
  if (query) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      query = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, query, submessage_arena);
    }
    set_has_query();
    target_type_.query_ = query;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.query)
}
void Target::set_allocated_documents(::google::firestore::v1beta1::Target_DocumentsTarget* documents) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_target_type();
  if (documents) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      documents = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, documents, submessage_arena);
    }
    set_has_documents();
    target_type_.documents_ = documents;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.documents)
}
void Target::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_resume_type();
  if (read_time) {
    ::google::protobuf::Arena* submessage_arena =
      reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
    if (message_arena != submessage_arena) {
      read_time = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, read_time, submessage_arena);
    }
    set_has_read_time();
    resume_type_.read_time_ = read_time;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.read_time)
}
void Target::clear_read_time() {
  if (has_read_time()) {
    delete resume_type_.read_time_;
    clear_has_resume_type();
  }
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Target::kQueryFieldNumber;
const int Target::kDocumentsFieldNumber;
const int Target::kResumeTokenFieldNumber;
const int Target::kReadTimeFieldNumber;
const int Target::kTargetIdFieldNumber;
const int Target::kOnceFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Target::Target()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Target)
}
Target::Target(const Target& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&target_id_, &from.target_id_,
    static_cast<size_t>(reinterpret_cast<char*>(&once_) -
    reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  clear_has_target_type();
  switch (from.target_type_case()) {
    case kQuery: {
      mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query());
      break;
    }
    case kDocuments: {
      mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents());
      break;
    }
    case TARGET_TYPE_NOT_SET: {
      break;
    }
  }
  clear_has_resume_type();
  switch (from.resume_type_case()) {
    case kResumeToken: {
      set_resume_token(from.resume_token());
      break;
    }
    case kReadTime: {
      mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
      break;
    }
    case RESUME_TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Target)
}

void Target::SharedCtor() {
  ::memset(&target_id_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&once_) -
      reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  clear_has_target_type();
  clear_has_resume_type();
  _cached_size_ = 0;
}

Target::~Target() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Target)
  SharedDtor();
}

void Target::SharedDtor() {
  if (has_target_type()) {
    clear_target_type();
  }
  if (has_resume_type()) {
    clear_resume_type();
  }
}

void Target::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Target::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const Target& Target::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget();
  return *internal_default_instance();
}

Target* Target::New(::google::protobuf::Arena* arena) const {
  Target* n = new Target;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Target::clear_target_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Target)
  switch (target_type_case()) {
    case kQuery: {
      delete target_type_.query_;
      break;
    }
    case kDocuments: {
      delete target_type_.documents_;
      break;
    }
    case TARGET_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = TARGET_TYPE_NOT_SET;
}

void Target::clear_resume_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Target)
  switch (resume_type_case()) {
    case kResumeToken: {
      resume_type_.resume_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kReadTime: {
      delete resume_type_.read_time_;
      break;
    }
    case RESUME_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[1] = RESUME_TYPE_NOT_SET;
}


void Target::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Target)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&target_id_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&once_) -
      reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  clear_target_type();
  clear_resume_type();
  _internal_metadata_.Clear();
}

bool Target::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Target)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.firestore.v1beta1.Target.QueryTarget query = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_query()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_documents()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes resume_token = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_resume_token()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // int32 target_id = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &target_id_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bool once = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &once_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp read_time = 11;
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_read_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Target)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Target)
  return false;
#undef DO_
}

void Target::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Target)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Target.QueryTarget query = 2;
  if (has_query()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *target_type_.query_, output);
  }

  // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3;
  if (has_documents()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *target_type_.documents_, output);
  }

  // bytes resume_token = 4;
  if (has_resume_token()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      4, this->resume_token(), output);
  }

  // int32 target_id = 5;
  if (this->target_id() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->target_id(), output);
  }

  // bool once = 6;
  if (this->once() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->once(), output);
  }

  // .google.protobuf.Timestamp read_time = 11;
  if (has_read_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      11, *resume_type_.read_time_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Target)
}

::google::protobuf::uint8* Target::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Target)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Target.QueryTarget query = 2;
  if (has_query()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, *target_type_.query_, deterministic, target);
  }

  // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3;
  if (has_documents()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, *target_type_.documents_, deterministic, target);
  }

  // bytes resume_token = 4;
  if (has_resume_token()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        4, this->resume_token(), target);
  }

  // int32 target_id = 5;
  if (this->target_id() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->target_id(), target);
  }

  // bool once = 6;
  if (this->once() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->once(), target);
  }

  // .google.protobuf.Timestamp read_time = 11;
  if (has_read_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        11, *resume_type_.read_time_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Target)
  return target;
}

size_t Target::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Target)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // int32 target_id = 5;
  if (this->target_id() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->target_id());
  }

  // bool once = 6;
  if (this->once() != 0) {
    total_size += 1 + 1;
  }

  switch (target_type_case()) {
    // .google.firestore.v1beta1.Target.QueryTarget query = 2;
    case kQuery: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *target_type_.query_);
      break;
    }
    // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3;
    case kDocuments: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *target_type_.documents_);
      break;
    }
    case TARGET_TYPE_NOT_SET: {
      break;
    }
  }
  switch (resume_type_case()) {
    // bytes resume_token = 4;
    case kResumeToken: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->resume_token());
      break;
    }
    // .google.protobuf.Timestamp read_time = 11;
    case kReadTime: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *resume_type_.read_time_);
      break;
    }
    case RESUME_TYPE_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Target::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Target)
  GOOGLE_DCHECK_NE(&from, this);
  const Target* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Target>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Target)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Target)
    MergeFrom(*source);
  }
}

void Target::MergeFrom(const Target& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Target)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.target_id() != 0) {
    set_target_id(from.target_id());
  }
  if (from.once() != 0) {
    set_once(from.once());
  }
  switch (from.target_type_case()) {
    case kQuery: {
      mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query());
      break;
    }
    case kDocuments: {
      mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents());
      break;
    }
    case TARGET_TYPE_NOT_SET: {
      break;
    }
  }
  switch (from.resume_type_case()) {
    case kResumeToken: {
      set_resume_token(from.resume_token());
      break;
    }
    case kReadTime: {
      mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
      break;
    }
    case RESUME_TYPE_NOT_SET: {
      break;
    }
  }
}

void Target::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Target)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Target::CopyFrom(const Target& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Target)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Target::IsInitialized() const {
  return true;
}

void Target::Swap(Target* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Target::InternalSwap(Target* other) {
  using std::swap;
  swap(target_id_, other->target_id_);
  swap(once_, other->once_);
  swap(target_type_, other->target_type_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(resume_type_, other->resume_type_);
  swap(_oneof_case_[1], other->_oneof_case_[1]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Target::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void TargetChange::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_TargetChange_default_instance_._instance.get_mutable()->cause_ = const_cast< ::google::rpc::Status*>(
      ::google::rpc::Status::internal_default_instance());
  ::google::firestore::v1beta1::_TargetChange_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void TargetChange::clear_cause() {
  if (GetArenaNoVirtual() == NULL && cause_ != NULL) {
    delete cause_;
  }
  cause_ = NULL;
}
void TargetChange::clear_read_time() {
  if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
    delete read_time_;
  }
  read_time_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TargetChange::kTargetChangeTypeFieldNumber;
const int TargetChange::kTargetIdsFieldNumber;
const int TargetChange::kCauseFieldNumber;
const int TargetChange::kResumeTokenFieldNumber;
const int TargetChange::kReadTimeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TargetChange::TargetChange()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTargetChange();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.TargetChange)
}
TargetChange::TargetChange(const TargetChange& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      target_ids_(from.target_ids_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.resume_token().size() > 0) {
    resume_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  }
  if (from.has_cause()) {
    cause_ = new ::google::rpc::Status(*from.cause_);
  } else {
    cause_ = NULL;
  }
  if (from.has_read_time()) {
    read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  } else {
    read_time_ = NULL;
  }
  target_change_type_ = from.target_change_type_;
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.TargetChange)
}

void TargetChange::SharedCtor() {
  resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&cause_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&target_change_type_) -
      reinterpret_cast<char*>(&cause_)) + sizeof(target_change_type_));
  _cached_size_ = 0;
}

TargetChange::~TargetChange() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.TargetChange)
  SharedDtor();
}

void TargetChange::SharedDtor() {
  resume_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete cause_;
  if (this != internal_default_instance()) delete read_time_;
}

void TargetChange::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TargetChange::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TargetChange& TargetChange::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTargetChange();
  return *internal_default_instance();
}

TargetChange* TargetChange::New(::google::protobuf::Arena* arena) const {
  TargetChange* n = new TargetChange;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void TargetChange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.TargetChange)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  target_ids_.Clear();
  resume_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && cause_ != NULL) {
    delete cause_;
  }
  cause_ = NULL;
  if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
    delete read_time_;
  }
  read_time_ = NULL;
  target_change_type_ = 0;
  _internal_metadata_.Clear();
}

bool TargetChange::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.TargetChange)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          set_target_change_type(static_cast< ::google::firestore::v1beta1::TargetChange_TargetChangeType >(value));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 target_ids = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_target_ids())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 18u, input, this->mutable_target_ids())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.rpc.Status cause = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_cause()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bytes resume_token = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_resume_token()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp read_time = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_read_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.TargetChange)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.TargetChange)
  return false;
#undef DO_
}

void TargetChange::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.TargetChange)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1;
  if (this->target_change_type() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->target_change_type(), output);
  }

  // repeated int32 target_ids = 2;
  if (this->target_ids_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _target_ids_cached_byte_size_));
  }
  for (int i = 0, n = this->target_ids_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
      this->target_ids(i), output);
  }

  // .google.rpc.Status cause = 3;
  if (this->has_cause()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *this->cause_, output);
  }

  // bytes resume_token = 4;
  if (this->resume_token().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      4, this->resume_token(), output);
  }

  // .google.protobuf.Timestamp read_time = 6;
  if (this->has_read_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, *this->read_time_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.TargetChange)
}

::google::protobuf::uint8* TargetChange::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.TargetChange)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1;
  if (this->target_change_type() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->target_change_type(), target);
  }

  // repeated int32 target_ids = 2;
  if (this->target_ids_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      2,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _target_ids_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32NoTagToArray(this->target_ids_, target);
  }

  // .google.rpc.Status cause = 3;
  if (this->has_cause()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, *this->cause_, deterministic, target);
  }

  // bytes resume_token = 4;
  if (this->resume_token().size() > 0) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        4, this->resume_token(), target);
  }

  // .google.protobuf.Timestamp read_time = 6;
  if (this->has_read_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        6, *this->read_time_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.TargetChange)
  return target;
}

size_t TargetChange::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.TargetChange)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated int32 target_ids = 2;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->target_ids_);
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _target_ids_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // bytes resume_token = 4;
  if (this->resume_token().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->resume_token());
  }

  // .google.rpc.Status cause = 3;
  if (this->has_cause()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->cause_);
  }

  // .google.protobuf.Timestamp read_time = 6;
  if (this->has_read_time()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->read_time_);
  }

  // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1;
  if (this->target_change_type() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->target_change_type());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void TargetChange::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.TargetChange)
  GOOGLE_DCHECK_NE(&from, this);
  const TargetChange* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const TargetChange>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.TargetChange)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.TargetChange)
    MergeFrom(*source);
  }
}

void TargetChange::MergeFrom(const TargetChange& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.TargetChange)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  target_ids_.MergeFrom(from.target_ids_);
  if (from.resume_token().size() > 0) {

    resume_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  }
  if (from.has_cause()) {
    mutable_cause()->::google::rpc::Status::MergeFrom(from.cause());
  }
  if (from.has_read_time()) {
    mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  }
  if (from.target_change_type() != 0) {
    set_target_change_type(from.target_change_type());
  }
}

void TargetChange::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.TargetChange)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TargetChange::CopyFrom(const TargetChange& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.TargetChange)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TargetChange::IsInitialized() const {
  return true;
}

void TargetChange::Swap(TargetChange* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TargetChange::InternalSwap(TargetChange* other) {
  using std::swap;
  target_ids_.InternalSwap(&other->target_ids_);
  resume_token_.Swap(&other->resume_token_);
  swap(cause_, other->cause_);
  swap(read_time_, other->read_time_);
  swap(target_change_type_, other->target_change_type_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata TargetChange::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void ListCollectionIdsRequest::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ListCollectionIdsRequest::kParentFieldNumber;
const int ListCollectionIdsRequest::kPageSizeFieldNumber;
const int ListCollectionIdsRequest::kPageTokenFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ListCollectionIdsRequest::ListCollectionIdsRequest()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequest();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListCollectionIdsRequest)
}
ListCollectionIdsRequest::ListCollectionIdsRequest(const ListCollectionIdsRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.parent().size() > 0) {
    parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.page_token().size() > 0) {
    page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  }
  page_size_ = from.page_size_;
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListCollectionIdsRequest)
}

void ListCollectionIdsRequest::SharedCtor() {
  parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  page_size_ = 0;
  _cached_size_ = 0;
}

ListCollectionIdsRequest::~ListCollectionIdsRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListCollectionIdsRequest)
  SharedDtor();
}

void ListCollectionIdsRequest::SharedDtor() {
  parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void ListCollectionIdsRequest::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ListCollectionIdsRequest::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ListCollectionIdsRequest& ListCollectionIdsRequest::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequest();
  return *internal_default_instance();
}

ListCollectionIdsRequest* ListCollectionIdsRequest::New(::google::protobuf::Arena* arena) const {
  ListCollectionIdsRequest* n = new ListCollectionIdsRequest;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ListCollectionIdsRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  page_size_ = 0;
  _internal_metadata_.Clear();
}

bool ListCollectionIdsRequest::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string parent = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_parent()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->parent().data(), static_cast<int>(this->parent().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListCollectionIdsRequest.parent"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // int32 page_size = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &page_size_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string page_token = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_page_token()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->page_token().data(), static_cast<int>(this->page_token().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListCollectionIdsRequest.page_token"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListCollectionIdsRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListCollectionIdsRequest)
  return false;
#undef DO_
}

void ListCollectionIdsRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->parent().data(), static_cast<int>(this->parent().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListCollectionIdsRequest.parent");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->parent(), output);
  }

  // int32 page_size = 2;
  if (this->page_size() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->page_size(), output);
  }

  // string page_token = 3;
  if (this->page_token().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->page_token().data(), static_cast<int>(this->page_token().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListCollectionIdsRequest.page_token");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->page_token(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListCollectionIdsRequest)
}

::google::protobuf::uint8* ListCollectionIdsRequest::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->parent().data(), static_cast<int>(this->parent().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListCollectionIdsRequest.parent");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->parent(), target);
  }

  // int32 page_size = 2;
  if (this->page_size() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->page_size(), target);
  }

  // string page_token = 3;
  if (this->page_token().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->page_token().data(), static_cast<int>(this->page_token().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListCollectionIdsRequest.page_token");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->page_token(), target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListCollectionIdsRequest)
  return target;
}

size_t ListCollectionIdsRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string parent = 1;
  if (this->parent().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->parent());
  }

  // string page_token = 3;
  if (this->page_token().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->page_token());
  }

  // int32 page_size = 2;
  if (this->page_size() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->page_size());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ListCollectionIdsRequest::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const ListCollectionIdsRequest* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ListCollectionIdsRequest>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListCollectionIdsRequest)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListCollectionIdsRequest)
    MergeFrom(*source);
  }
}

void ListCollectionIdsRequest::MergeFrom(const ListCollectionIdsRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.parent().size() > 0) {

    parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  if (from.page_token().size() > 0) {

    page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  }
  if (from.page_size() != 0) {
    set_page_size(from.page_size());
  }
}

void ListCollectionIdsRequest::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListCollectionIdsRequest::CopyFrom(const ListCollectionIdsRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListCollectionIdsRequest::IsInitialized() const {
  return true;
}

void ListCollectionIdsRequest::Swap(ListCollectionIdsRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ListCollectionIdsRequest::InternalSwap(ListCollectionIdsRequest* other) {
  using std::swap;
  parent_.Swap(&other->parent_);
  page_token_.Swap(&other->page_token_);
  swap(page_size_, other->page_size_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ListCollectionIdsRequest::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void ListCollectionIdsResponse::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ListCollectionIdsResponse::kCollectionIdsFieldNumber;
const int ListCollectionIdsResponse::kNextPageTokenFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ListCollectionIdsResponse::ListCollectionIdsResponse()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponse();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListCollectionIdsResponse)
}
ListCollectionIdsResponse::ListCollectionIdsResponse(const ListCollectionIdsResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      collection_ids_(from.collection_ids_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.next_page_token().size() > 0) {
    next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListCollectionIdsResponse)
}

void ListCollectionIdsResponse::SharedCtor() {
  next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _cached_size_ = 0;
}

ListCollectionIdsResponse::~ListCollectionIdsResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListCollectionIdsResponse)
  SharedDtor();
}

void ListCollectionIdsResponse::SharedDtor() {
  next_page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void ListCollectionIdsResponse::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ListCollectionIdsResponse::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ListCollectionIdsResponse& ListCollectionIdsResponse::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponse();
  return *internal_default_instance();
}

ListCollectionIdsResponse* ListCollectionIdsResponse::New(::google::protobuf::Arena* arena) const {
  ListCollectionIdsResponse* n = new ListCollectionIdsResponse;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ListCollectionIdsResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  collection_ids_.Clear();
  next_page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

bool ListCollectionIdsResponse::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated string collection_ids = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_collection_ids()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->collection_ids(this->collection_ids_size() - 1).data(),
            static_cast<int>(this->collection_ids(this->collection_ids_size() - 1).length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string next_page_token = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_next_page_token()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListCollectionIdsResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListCollectionIdsResponse)
  return false;
#undef DO_
}

void ListCollectionIdsResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string collection_ids = 1;
  for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->collection_ids(i).data(), static_cast<int>(this->collection_ids(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->collection_ids(i), output);
  }

  // string next_page_token = 2;
  if (this->next_page_token().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->next_page_token(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListCollectionIdsResponse)
}

::google::protobuf::uint8* ListCollectionIdsResponse::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string collection_ids = 1;
  for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->collection_ids(i).data(), static_cast<int>(this->collection_ids(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(1, this->collection_ids(i), target);
  }

  // string next_page_token = 2;
  if (this->next_page_token().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->next_page_token(), target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListCollectionIdsResponse)
  return target;
}

size_t ListCollectionIdsResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated string collection_ids = 1;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->collection_ids_size());
  for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->collection_ids(i));
  }

  // string next_page_token = 2;
  if (this->next_page_token().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->next_page_token());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ListCollectionIdsResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const ListCollectionIdsResponse* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ListCollectionIdsResponse>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListCollectionIdsResponse)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListCollectionIdsResponse)
    MergeFrom(*source);
  }
}

void ListCollectionIdsResponse::MergeFrom(const ListCollectionIdsResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  collection_ids_.MergeFrom(from.collection_ids_);
  if (from.next_page_token().size() > 0) {

    next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  }
}

void ListCollectionIdsResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListCollectionIdsResponse::CopyFrom(const ListCollectionIdsResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListCollectionIdsResponse::IsInitialized() const {
  return true;
}

void ListCollectionIdsResponse::Swap(ListCollectionIdsResponse* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ListCollectionIdsResponse::InternalSwap(ListCollectionIdsResponse* other) {
  using std::swap;
  collection_ids_.InternalSwap(&other->collection_ids_);
  next_page_token_.Swap(&other->next_page_token_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ListCollectionIdsResponse::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace v1beta1
}  // namespace firestore
}  // namespace google

// @@protoc_insertion_point(global_scope)
